| Welcome to WebmasterWorld Guest from 184.108.40.206 |
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
|Become a Pro Member|
|Redirect URL from Virtual root subdomain to addon domain|
| 2:39 pm on Dec 29, 2011 (gmt 0)|
I have a example-root.com as my virtualroot so my addon domains are created inside the public_html directory.
I have addon domain called www.example-addon.com which is in public_html/example-addon directory.
Now my problem is it became two different version of the same site. So my entire site is became as duplicate contents and many URL from example-root.com/example-addon also indexed in search engine.
Both the website uses Drupal7 CMS.
Does anyone know how to redirect the later one to earlier one that is example-root/example-addon to example-addon.com
[edited by: ergophobe at 8:57 pm (utc) on Jan 4, 2012]
[edit reason] URLs exemplified; formatting for readability [/edit]
| 3:29 pm on Dec 29, 2011 (gmt 0)|
One or two lines of RewriteRule code will do the job.
It's almost the same code you use to redirect non-www to www. Just test for NOT www.example.com to redirect all non-canonical variants.
Use example.com in this forum to suppress the auto-linking function.
All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved