Can I use .htaccess to convert a url slug to a POST request?

妖精的绣舞 提交于 2019-12-11 22:36:21

问题


I would like to use .htaccess to take a URL like this:

mydomain.com/some-url-slug

and instead redirects the user to mydomain.com, but with a POST request that includes "some-url-slug".

Is this possible? Thanks!!


回答1:


NO it's not possible - mod_rewrite rules cannot alter or rewrite POST data.

Obviously there are some security constraints in doing so, hence mod_rewrite developers didn't allow that.



来源:https://stackoverflow.com/questions/18345102/can-i-use-htaccess-to-convert-a-url-slug-to-a-post-request

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!