Page is a not externally linkable
- Code, Content, and Presentation
-- Apache Web Server
---- Addon domains! Is there any sense on it on Apache?


galench - 11:46 am on Mar 22, 2008 (gmt 0)


I glad to hear you here Jim!
So, it is not necessary for me redirect example.com/addon/ or addon.example.com or www.addon.example.com to addon.com! I want for it looks like what addon domains content do not exist on the main domain!
No links to this content from the basic domain exist since there aren`t present any content now. Accordingly it aren`t presented in search engines. Therefore I think what it isn`t necessary 403 or 404 Page to be load if request addon folders (subfolders, files). It`s necessary redirect to main domain.

As far as I have understood it`s necessarily to write both rules - in addon folder and main?
Or, if in my case when addon folders (subdomains) requests need redirect to the main domain, I need only to add one rule in addon folder?

RewriteEngine on
#Redirect to example.com if request was made to www.addon.example.com or addon.example.com
RewriteCond %{HTTP_HOST} ^(www\.)?addon\.example\.com [NC]
RewriteRule (.*) http://example.com/$1 [R=301,L]


Thread source:: http://www.webmasterworld.com/apache/3607140.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com