how can I redirect individual pages from a static site to a WP site using htacce
-
Hi –
I have read about 24 threads on redirects here, but they all seem to assume that either
1. the redirects are from one WP site to another, or
2. the redirects are from one page pof the same name to another of the same name.I have a situation where the client wants to redirect from an old, hand-coded site, to a new WP site, and has given me redirect map of 21 redirects for individual pages. The old site is in fact coded in PHP but is not WP, and unfortunately the pages are not named the same in the new site. To further complicate things, the two domains are not hosted on the same account.
The client’s SEO guru is adamant about the individual page redirects so the new site won’t lose and “SEO juice” during the transition.For example, he wants this:
https://old-domain.com/onepage.php redirects to https://new-domain.com/anotherpagename/What I have so far is this:
RewriteEngine On Redirect 301 https://old-domain.com/ https://new-domain.com/ Redirect 301 https://old-domain.com/aboutus.php https://new-domain.com/about/ Redirect 301 https://old-domain.com/ourservices.php https://new-domain.com/services/ Redirect 301 https://old-domain.com/contactus.php https://new-domain.com/contact/ Redirect 301 https://old-domain.com/contactus.php https://new-domain.com/contact/quote/
I have put this htaccess file has to be in the root of the old-domain.com
now the domain redirects and the pages show up properly – you can see the link address in the bottom of the browser and it is the new-domain.com address – but the URL in the address bar does not change to new-domain.comIf anyone has any ideas about how I can fix this, I would be very grateful.
Thanks.
- The topic ‘how can I redirect individual pages from a static site to a WP site using htacce’ is closed to new replies.