Jump to content
Sign in to follow this  
Don E

POST url/mod_rewrite question

Recommended Posts

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Fixed the problem. I had a naming conflict within the root directory. Thanks for your input JSG.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...