I’ve ported an old Wordpress blog over to EE and I’m trying to redirect the old Wordpress urls to the new EE ones.
The old urls look like this:
http://mydomain.com/2010/05/url_title/
In EE, I’d like them to look like this:
http://mydomain.com/news/article/url_title/
I’ve tried doing a ReidrectMatch 301 …. my htaccess file looks like this:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond $1 !\.(gif|jpe?g|png)$ [NC]
RewriteRule ^(.*)$ /index.php?/$1 [L]
</IfModule>
RedirectMatch 301 ^/([0-9]+)/([0-9]+)/(.*)$ <a href="http://mydomain.com/index.php/news/article/$3">http://mydomain.com/index.php/news/article/$3</a>However the result is a url like this:
http://mydomain.com/news/article/url_title/?/2010/05/url_title/
As you can see it’s adding a bunch of unwanted segments. I think it has something to do with removing index.php for EE, but I’m not quite sure how to fix.
Any ideas?