Addon domain & .htaccess

I have an addon domain. The parent hosting account uses a CMS with an .htaccess file. Both domains (parent and addon) use Cloudflare. The problem is that when I visit the addon url it redirects to the parent domain.

Am I correct in assuming this is because of something in the root .htaccess file? Do I need to add a redirect specific to the addon url?

Todd


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Can you say a little more about this “add-on” domain? I am not familiar with that term.

Walter

On Oct 19, 2014, at 5:13 PM, Todd email@hidden wrote:

I have an addon domain. The parent hosting account uses a CMS with an .htaccess file. Both domains (parent and addon) use Cloudflare. The problem is that when I visit the addon url it redirects to the parent domain.

Am I correct in assuming this is because of something in the root .htaccess file? Do I need to add a redirect specific to the addon url?

Todd


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

It’s similar to a subdomain. It allows you to add separate domains to a single domain hosting account. So for example, if the parent account were http://parent.com http://parent.com/ (/public_html/) I could also have an addon like http://myotherdomain.us http://myotherdomain.us/ (/public_html/myotherdomain.us/ http://myotherdomain.us/), both of which would share the cPanel and resources of the parent account.

Todd

Can you say a little more about this “add-on” domain? I am not familiar with that term.


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Okay, so that sounds like wildcard dns, then. And in CloudFlare, do you have both URLs set as separate domain names, each with their own A record? Or did you set the subdomain as a C record and the main domain as the A record?

Walter

On Oct 19, 2014, at 8:06 PM, Todd email@hidden wrote:

It’s similar to a subdomain. It allows you to add separate domains to a single domain hosting account. So for example, if the parent account were http://parent.com http://parent.com/ (/public_html/) I could also have an addon like http://myotherdomain.us http://myotherdomain.us/ (/public_html/myotherdomain.us/ http://myotherdomain.us/), both of which would share the cPanel and resources of the parent account.

Todd

Can you say a little more about this “add-on” domain? I am not familiar with that term.


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

They each have their own A record. I just heard from CF support and they assured me the issue isn’t related to their settings.

Out of curiosity I disabled the (CMS) .htaccess in the parent root and sure enough, the addon url is now accessible. So it seems I need to futz about with the .htaccess.

Todd

Okay, so that sounds like wildcard dns, then. And in CloudFlare, do you have both URLs set as separate domain names, each with their own A record? Or did you set the subdomain as a C record and the main domain as the A record?


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Some progress with this .htaccess file placed in the addon domain root.

This works, but only if I type www, otherwise it redirects.

Options +FollowSymLinks
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.html [L]
RewriteCond %{HTTP_HOST} !^(www.)?addon.us$ [NC]
RewriteCond %{HTTP_HOST} !^$ [NC]
RewriteRule ^(.*)$ http://www.addon.us/$1 [R=301,NC,L]

Todd


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options