I have recently started using WordPress for building sites rather than Joomla but appear to be having difficulty in re-directing old URL’s to the new URL.
I have a lot of URL’s to re-direct so I use an online 301 generator which has always worked perfectly for me in Joomla but WordPress just ignores it.
Any idea’s where I am going wrong.
Here is a snippet of my .htaccess.
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
# 301 Redirect 1
RewriteCond %{QUERY_STRING} ^$
RewriteRule ^cmxE2x80x8E/$ /? [R=301,NE,NC,L]
# 301 Redirect 2
RewriteCond %{QUERY_STRING} ^$
RewriteRule ^cm/commercial.htmlxE2x80x8E$ /commercial-solicitors? [R=301,NE,NC,L]
# 301 Redirect 3
RewriteCond %{QUERY_STRING} ^$
RewriteRule ^cm/insolvency.htmlxE2x80x8E$ /commercial-solicitors/insolvency-service/? [R=301,NE,NC,L]
# 301 Redirect 4
RewriteCond %{QUERY_STRING} ^$
RewriteRule ^cm/court-work.htmlxE2x80x8E$ /court-work/? [R=301,NE,NC,L]
# 301 Redirect 5
RewriteCond %{QUERY_STRING} ^$
RewriteRule ^cm/renting-properties.html$ /property/leasing-properties/? [R=301,NE,NC,L]`
Any help will be greatly appreciated.
Try putting your own rules above WordPress’ one.
The
[L]
(last) flag on some of WordPress’ rules tells it to ignore subsequent rules.In other words, place them above
# BEGIN WordPress