Hi all.
Just thought I'd let you know a solution to a problem that I recently encountered.
A parked domain is for the root domain only, so if your root domain is called whatever.com, you can create a parked domain called whateverelse.com. When you visit whateverelse.com you will see the contents of whatever.com.
The problem is that you can't create a parked domain that shows the contents of an addon domain. For example, if you create an addon domain called addon.com, you can't then create a parked domain called addon.co.uk that shows the contents of addon.com.
You can ask eukhost to make the necessary server configuration changes to allow this to happen, but you could also use mod_rewrite to achieve the same.
Simply create your addon domain, then create your parked domain. Assuming the above example domain names, add the following to the .htaccess file that resides in the public_html directory:
Code:
# Parked domains for addon.com addon domain.
RewriteCond %{HTTP_HOST} ^addon\.co\.uk [OR]
RewriteCond %{HTTP_HOST} ^www\.addon\.co\.uk
RewriteCond %{REQUEST_URI} !^/addon/
RewriteRule ^(.*) /addon/$1
So, when you visit addon.co.uk or
www.addon.co.uk you will see the contents of addon.com. Note that this is different to a redirect because the domain name does not change in the browser's location bar.
If you need to add more subdomains to addon.co.uk, simply duplicate the line that contains the www and change the www to be whatever subdomain you need.
You could alternatively use the following, which catches all subdomains:
Code:
# Parked domains for addon.com addon domain.
RewriteCond %{HTTP_HOST} ^.*\.?addon\.co\.uk
RewriteCond %{REQUEST_URI} !^/addon/
RewriteRule ^(.*) /addon/$1
Hope this is helpful to someone.
Steph(an)