Category Archives: add-on

Add on domain displays subdomain

I am having an issue with my redirects. I have my main domain www.abc.com and an add on domain. www.def.com. If you enter www.def.com it will redirect to www.def.abc.com. I understand that when you create an add on domain, your host automatically creates a subdomain. However I need the add on domain to display www.def.com not www.def.abc.com .

My current set up:

ADD ON DOMAIN:


www.def.com

Document Root /Public_html/def

Redirects to (Not redirected)

SUB DOMAIN (automatically created)


www.def.abc.com

Document Root /public_html/irmcwear

Redirects to (Not redirected)


All of my site files are stored in /public_html/irmcwear. I tried editing the .htaccess file but then my browser gets a “too many redirects” error

Ive tried this and a few others with no luck.

<IfModule mod_rewrite.c>
    RewriteEngine On
RewriteCond %{HTTP_HOST} abc.com$
    RewriteRule ^(.*)$ "http://def.com/" [R=301,L]
</IfModule>