using mod rewrite to redirect from old url structure
-
I’ve moved my blog from a handrolled CMS to wordpress, and everything has gone smoothly except redirecting old URL’s.
I’ve searched the forums (and google) for an answer but haven’t found anything that works, so now I’m asking here.
It would be virtually impossible to map my old URL structure onto wordpresses, so all I want to do is redirect any URLs which point to the old directory to my achives page.
I’ve got the following code in my .htaccess file
RewriteEngine On
RewriteRule ^wotw/(.*)$ https://ignis-fatuus.org/archives/ [R=301,L]
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
However, this doesn’t work and I get a wp 404 page.
My rewrite rule works on a “normal” site, so it must be conflicting with the wordpress permalink rules. Does anybody have any advise on how to overcome this conflict?
- The topic ‘using mod rewrite to redirect from old url structure’ is closed to new replies.