| Redirect URL from Virtual root subdomain to addon domain
|
vividvilla

msg:4402160 | 2:39 pm on Dec 29, 2011 (gmt 0) | hello there 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]
|
g1smd

msg:4402175 | 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.
|
|
|