[wp-hackers] Help with redirect rule
Chris Williams
chris at clwill.com
Wed Jun 14 17:12:24 GMT 2006
I would approach WP support with this, but from the recent discussions
here about rewrites/redirects, and this issue's complexities with the
post and preview logic, I was hoping for help here.
For years I had a site with index.html as its front page. Google hit it
just fine and indexed it.
Now I'm a dyed-in-the-wool WP'er and love it. But that makes index.php
my front page. Google still has index.html, which now gets a 404. So I
thought I'd use .htaccess to do a permanent redirect, give Google their
301 and life would be good. I added this line to my .htaccess:
RedirectMatch permanent (.*)index\.html$ $1index.php
Worked great, references to index.html go to my main page, all is
wonderful in Google-land (they even crawled and saw the change). The
rest of the site is working fine too. I thought everything was
hunky-dory.
Except in post's page preview. It always shows my home page, not the
post being edited. If I comment out this line from .htaccess, I see the
post, but then of course people going to the old .html get hosed.
Suggestions? Comments? Help?
Thanks in advance,
Chris
More information about the wp-hackers
mailing list