Don E Posted May 21, 2012 Share Posted May 21, 2012 Hey everyone, I was wondering if it's possible to do a mod_rewrite for form POST/action urls?For example:<form method="post" action="page.php"> .............</form>Here's what I have: Options +FollowSymlinksOptions -IndexesRewriteEngine OnRewriteRule ^([a-zA-Z]+)\/?$ $1.php [nc,l] For the form, instead of the action being like how it is above, can I have it like this: <form method="post" action="page/"> .............</form> But when happens when submitting the page, it does/goes to this: http://localhost/testsite/page/page.php'>http://localhost/testsite/page/page.php Is it possible to get it to show/go to http://localhost/testsite/page/ (which is actually http://localhost/testsite/page.php)? Thanks. Link to comment Share on other sites More sharing options...
justsomeguy Posted May 21, 2012 Share Posted May 21, 2012 It should work fine, the Apache rules don't cause a new request to get sent, they only redirect the current request to a different place. Link to comment Share on other sites More sharing options...
Don E Posted May 22, 2012 Author Share Posted May 22, 2012 Fixed the problem. I had a naming conflict within the root directory. Thanks for your input JSG. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now