Forum Moderators: phranque
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{HTTP_HOST} ^localhost [NC]
RewriteRule (.*)\.html$ index.php?a=$1
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{HTTP_HOST} ^localhost [NC]
RewriteRule ^/mysite/(.*)\.html$ index.php?a=$1
You have your /'s reversed for .htaccess use:
RewriteRule ^/mysite/(.*)\.html$ index.php?a=$1 [NC]
Should be:
RewriteRule ^mysite/(.*)\.html$ /index.php?a=$1 [NC]
And more efficient and correct would be:
RewriteRule ^mysite/([^.]+)\.html$ /index.php?a=$1 [NC,L]
[L] = Last -- should always be used unless you know you do not need it.
([^.]+) = Forward looking (anything that is not a .(dot)) -- it is faster to check for a single character and break when you find it, than to get everything and backtrack.
Justin