Mod rewrite using localhost
Posted by: daisydoos (---.dslgb.com)
Date: April 07, 2008 08:49PM

Hi,
When developing sites on a shared hosting environment, we use this rewrite rule in .htaccess, assuming the site sits in a folder below the root:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /websitename
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /websitename/index.php [L]
</IfModule>

For sites on localhost, I have been using this rule:

ErrorDocument 404 /websitename/index.php

It all works ok, but when I have a form which submits to the same page, it just doesnt work - none of the values can be echoed back -- I think this might be due to a problem with the .htaccess file - can someone help please!

Many thanks,

Daisy

Options: ReplyQuote


Sorry, only registered users may post in this forum.