[wp-hackers] Dealing with apache redirects
James Davis
james at freecharity.org.uk
Thu Oct 29 15:59:18 UTC 2009
I've just replaced an existing website with a WordPress based one,
moving much of the content from static HTML pages into WordPress pages.
There's still to map some of the old URLs to new WordPress pages, or to
handle the 404 a little more gracefully. So I currently have
http://bar.com/foo/ and the old site moved to http://bar.com/foo/archive
My .htaccess reads
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /services/csirt/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /foo/index.php [L]
</IfModule>
So for instance I'd like a request for the old
http://bar.com/foo/index.html to get redirected to
http://bar.com/foo/index.php rather than getting a WordPress 404 as I
currently do. How should the .htaccess be adjusted to cope with this? I
did think that adding at the top
Redirect /foo/index.html http://www.bar.com/foo/
Would do the trick but this appears to send me into a redirection loop. :(
Any thoughts?
James
More information about the wp-hackers
mailing list