Struggling with 301 redirect on some old pages
-
Hi there,
I’ve recently installed WordPress and have moved our site across from Joomla. Finding it much easier to use than Joomla, and am loving all the plugins etc.
My issue is when trying to set up permanent 301 redirects in .htaccess. The site used to be on coldfusion and when I set up redirects for any of these old pages that still show up in Google index, it works perfectly. For example:
Redirect 301 /building_wraps.cfm http://mediasoft.co.za/services/outdoor-advertising-services/building-wraps/
The old page redirects perfectly to the new, nicely formatted WordPress URL.
However, Google also has some of the Joomla URLs in its index, and when I try and redirect these using the same method, it doesn’t work i.e.
Redirect 301 /index.php?option=com_content&view=article&id=26&Itemid=215 http://mediasoft.co.za/services/outdoor-advertising-services/building-wraps/
What happens with these ones is they just redirect to the home page of the site, keeping the original query string, just minus the index.php part. So, the link above would go to the home page but display in the address bar as:
http://mediasoft.co.za/?option=com_content&view=article&id=26&Itemid=215
I’ve looked up articles on 301 redirects and redirecting paramaters, but can’t quite get my head around it. I’m fairly sure that WordPress generated code at the top of .htaccess is what is causing this issue (i.e. stripping away the index.php prior to redirect or something like that) but I’m not sure how to go about changing it.
This is the code generated by WordPress:
# 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
Any advice, suggestions or links to old answers to this same question will be greatly appreciated.
Many thanks
- The topic ‘Struggling with 301 redirect on some old pages’ is closed to new replies.