Nexus10 Posted July 10, 2010 Share Posted July 10, 2010 Options +FollowSymLinks RewriteEngine On RewriteBase / RewriteCond %{SCRIPT_FILENAME} !-d RewriteRule ^apple/register/?$ apple/register.php [NC,L] RewriteCond %{SCRIPT_FILENAME} !-d RewriteRule ^apple/account/register/?$ apple/register.php [NC,L] on register.php I have a form which is processed by 'registerProcess.php' If I go to mysite.com/register.php it all works good. If I go to mysite.com/register it all works good. If I go to mysite.com/register/ register.php is displayed as it should be, but the form processing then breaks as it tries to look for the processing php script in the location mysite.com/register/registerProcess.php, how can I fix this? Quote Link to comment https://forums.phpfreaks.com/topic/207371-simple-hopefully-rewrite-problem/ Share on other sites More sharing options...
wildteen88 Posted July 10, 2010 Share Posted July 10, 2010 In the action attribute to your form tag make sure your path starts with a forward slash / eg <form action="/registerProcess.php" method="post"> .... </form> Quote Link to comment https://forums.phpfreaks.com/topic/207371-simple-hopefully-rewrite-problem/#findComment-1084186 Share on other sites More sharing options...
Nexus10 Posted July 11, 2010 Author Share Posted July 11, 2010 In the action attribute to your form tag make sure your path starts with a forward slash / eg <form action="/registerProcess.php" method="post"> .... </form> I tried this and it now goes to mysite.com/registerProcess.php (omitting the apple subfolder), how do I get it to include that subfolder where the file is located? Quote Link to comment https://forums.phpfreaks.com/topic/207371-simple-hopefully-rewrite-problem/#findComment-1084284 Share on other sites More sharing options...
wildteen88 Posted July 11, 2010 Share Posted July 11, 2010 You'll have to include it within the action path. <form action="/apple/registerProcess.php" method="post"> .... </form> Quote Link to comment https://forums.phpfreaks.com/topic/207371-simple-hopefully-rewrite-problem/#findComment-1084373 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.