Forum Moderators: phranque

Message Too Old, No Replies

rewrite index.php to index.html w/ wordpress blog

         

digitalpimp

8:00 am on Jan 28, 2008 (gmt 0)

10+ Year Member



I would like to use .htaccess to rewrite index.php to index.html

this is my htaccess file:

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

# END WordPress
RewriteRule ^index.html index\.php

I get a 404 error, it doesnt work

wilderness

9:57 am on Jan 28, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Should be more than enough answers here:

[google.com...]

digitalpimp

7:56 pm on Jan 28, 2008 (gmt 0)

10+ Year Member



thanks but that doesnt help with my specific issue. I need to rewrite index.php to index.html

jdMorgan

10:30 pm on Jan 28, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



In that case, the pattern and substitution in your rule are backwards, and your rules are out of order -- put the index rewrite above the WP code.

Also look into regular-expressions "pattern anchoring" to avoid unexpected side effects due to unanchored patterns.

For more information, see the documents cited in our forum charter [webmasterworld.com] and the tutorials in the Apache forum section of the WebmasterWorld library [webmasterworld.com].

Jim