Hi
First, thanks for an awesome plugin, I use it on all of my live sites. Now, apologies if this is covered elsewhere, I’ve been hunting around for hours with different permutations fo what I think is the right question and can’t find an example of this which makes any sense to me, the more I hunt the more confused I’m getting.
I’ve redeveloped a site, with a new URL structure and a new domain. I have set up twenty 301 redirects via cPanel for old pages to go to their new equivalents. Everything works.
When I add the redirect code to the secure htaccess file (after activated BPS) as per this post http://forum.ait-pro.com/forums/topic/htaccess-redirect-code-where-do-i-add-redirect-htaccess-code/ the redirects all fail. I assume it’s because of the change in URL structure and therefore the code needs to go into a different place in the file.
My host has advised that the code needs to go above #BEGIN WordPress so evidently using the CUSTOM CODE BOTTOM text box is not correct.
As you can tell I am new to all this. How do I proceed with BPS? Please confirm if the code below is correct (and if not could you provide correct versions of these two examples please) and where/how I should add it to the secure file.
Here are two examples, redirecting the home page from: the-old-domain.co.uk to newdomain.co.uk and redirecting:
www.the-old-domain.co.uk/home/product-category/ to www.newdomain.co.uk/product-category/product-name/ RewriteEngine On RewriteCond %{HTTP_HOST} ^the\-old\-domain\.co\.uk$ [OR] RewriteCond %{HTTP_HOST} ^www\.the\-old\-domain\.co\.uk$ RewriteRule ^/?$ "http\:\/\/www\.newdomain\.co\.uk\/" [R=301,L] RewriteCond %{HTTP_HOST} ^the\-old\-domain\.co\.uk$ [OR] RewriteCond %{HTTP_HOST} ^www\.the\-old\-domain\.co\.uk$ RewriteRule ^home\/product\-category\/$ "http\:\/\/www\.newdomain\.co\.uk\/product\-category\/product\-name\/" [R=301,L]
Many thanks.
- This topic was modified 11 hours, 31 minutes ago by AITpro Admin.
- This topic was modified 11 hours, 29 minutes ago by AITpro Admin.
- This topic was modified 11 hours, 5 minutes ago by AITpro Admin.