: Setting up a redirect from 'www.example.com' to 'www.mysite.com/blog' hopefully someone can give me a roadmap to get this done. I run a self-hosted Wordpress blog at http://www.example.com which
hopefully someone can give me a roadmap to get this done.
I run a self-hosted Wordpress blog at
www.example.com
which has numerous posts/links such as
www.example.com/videos/this-is-post-23/ http://www.example.com/pictures/this-is-post-34/ www.example.com/news/this-is-post-67/
I am now planning in moving to a new domain, mysite.com.
I would like to move my content into mysite.com as follows:
mysite.com/blog/videos/this-is-post-23/ http://mysite.com/blog/pictures/this-is-post-34/ mysite.com/blog/news/this-is-post-67/
My sense is that a 301 redirect will not suffice and wonder if changes elsewhere (htaccess?) are needed to make this move without screwing up my pagerank (currently 5).
Any ideas or suggestions? My server is LAMP.
Thanks for helping!
More posts by @Murray155
1 Comments
Sorted by latest first Latest Oldest Best
301 Redirect is exactly what you need. You new URL (on new site) has single & very small constant/persistent difference: new URL has /blog in front of old URL.
As simple as:
Redirect 301 / mysite.com/blog/
The same but using mod_rewrite:
RewriteEngine On
RewriteRule (.*) mysite.com/blog/ [R=301,L]
Any of these rules should be place in .htaccess in website root folder on example.com site and placed before WordPress rewrite block.
The "bad" thing -- is that requests for images and other static resources (on old site) are also will be redirected .. and if they are located in a different location (not in /blog folder), you may have quite a few 404 hits on your new site (that's if someone will be requesting those resources directly, which should not happen under normal circumstances).
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.