[wp-hackers] Help with redirect rule

Rabin Vincent rabin at rab.in
Wed Jun 14 19:14:56 GMT 2006

On 6/14/06, Chris Williams <chris at clwill.com> wrote:
> My full .htaccess file is:
> -----
> ErrorDocument 404 /index.php?error=404
> # BEGIN WordPress
> <IfModule mod_rewrite.c>
> RewriteEngine On
> RewriteBase /
> RewriteCond %{REQUEST_FILENAME} !-f
> RewriteCond %{REQUEST_FILENAME} !-d
> RewriteRule . /index.php [L]
> </IfModule>
> # END WordPress
> # RedirectMatch permanent (.*)index\.html$ $1index.php
> -----
> Obviously the last line is commented out for testing.  I've had it
> before and after the WP rewrite rules, but the order doesn't effect it.

I took a quick glance at the WordPress preview code but I don't
see how your RedirectMatch is affecting it. But, do you realize
that your RedirectMatch will redirect things like
/something/else/abcindex.html to the .php? Is this intended?

Try this, it might even fix the previewing. Put these
three lines before the "BEGIN WordPress" line:

RewriteEngine On
RewriteBase /
RewriteRule ^index\.html$ index.php [L,R=301]


More information about the wp-hackers mailing list