Just Host Web Hosting Help
Restrict subdomain access to addon domains
Summary
Each Addon Domain requires a subdomain. Using mod_rewrite you can stop people from being able to use the addon domain as a subdomain of the primary domain
Preventing use of the Subdomain
Put this in the .htaccess file located at the subdomains folder, changing the subdomain, primarydomain.com and addondomain.com:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^subdomain.primarydomain.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.subdomain.primarydomain.com$ [OR]
RewriteCond %{HTTP_HOST} ^addondomain.com$
RewriteCond %{REQUEST_URI} ^/$
RewriteRule ^(.*)$ http://www.addondomain.com/ [R=301,L]
270,672 views
bookmark
share
tags: addon domain htaccess
Recommended Help Content
224,607 views
tags: accessible addon directory domain folders hidden htaccess inaccessible primary secondary
E-mail
Twitter
Google Bookmarks
Facebook
MySpace
Digg
Reddit
Delicious
LinkedIn
StumbleUpon