Reputation: 1
I have a url: www.abc.com/change.php
.
Parameters value is passed in post through $_POST[param]
.
I want to convert it to MVC like url through .htaccess
such that:
www.abc.com/change.php
with $_POST["height"]
redirects to www.abc.com/change/height
and:
www.abc.com/change.php
with $_POST["width"]
redirects to www.abc.com/change/width
.
How should my .htaccess
file be changed for it?
Upvotes: 0
Views: 227
Reputation: 891
I'm pretty sure you can't redirect or rewrite based on the name of a post variable.
Actually that's with .htaccess. If you redirect with php, you can definitely do that but that's not what you asked.
I guess you should also be able redirect/rewrite on get variable names.
Upvotes: 1