I am establishing some simple url spinning rules using mod_rewrite along with a .htacces file, but I have got a bit of problems. Basically setup the .htacces by doing this:

Options +FollowSymLinks

RewriteEngine On
RewriteBase /

RewriteRule /index.html /index.php [L]

after i call in the browser this url: http://localhost/~dave/mySite/index.html I acquired a 404 error.

By using this .htacces rather

Options +FollowSymLinks

RewriteEngine On
RewriteBase /

RewriteRule /index.html http://localhost/~dave/mySite/index.php [L]

everything works fine and that i obtain the index.php page I am expecting. Shall We Be Held instructed to user absolute web addresses because the target of the rewrite? Is a Apache configuration problem?

I am using Max OS X 10.6.2 using its standard Apache installation.

  1. The RewriteBase base directive is setting basics path you don't have to provide absolute pathways within the redirection rules.

  2. The rule pattern isn't plain text it is a regular expression.

  3. Should you set a complete URL as target you instruct the browser to redirect to that particular other location that type of redirection isn't transparent towards the user.

To summarize, do this rather:

RewriteRule ^index\.html$ index.php [L]

Try doing

RewriteRule ^(.*)/index.html $1/index.php [L]

Which should sort it.