ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Parked Domains / System / Channel paths

August 20, 2012 5:45am

Subscribe [5]
  • #1 / Aug 20, 2012 5:45am

    Damien Buckley

    62 posts

    I have a couple questions about how EE works were multiple domains are in use and also about paths.

    My client has cPanel hosting with one (.com.au) domain tied to the account and another (.biz) domain parked on the hosting account. At this stage I have the .com.au domain set throughout my EE configuration. I’m using the standard EE .htaccess to remove index.php

    Both domains resolve to the EE site and it works but if you arrive via the parked domain (.biz) once you click a link it returns to displaying the primary (.com.au) domain in the address bar.

    Does it matter to EE which domain you use and are there any performance issues with changing paths to the parked domain to use as the main site URL?

    Secondly, under channel path settings does it make any difference if paths are set http://exampledomain.com/news or {site_url}news? I have them all set using {site_url} at the moment and it works fine. I just wanted to check if there are any reasons not to do this?

  • #2 / Aug 20, 2012 6:10am

    Carl W Crawley

    136 posts

    In theory it doesn’t matter what domain you use to access the content since they’re just files and a database and will serve the content regardless.

    However, there are number of things you can do:

    If you create a dynamic config file (using PHP to construct the domains etc) - then you’ll be able to serve files from domain.com.au/news/ and domain.biz/news. The downside of this is that it’s not good for SEO Kungfu.

    My recommendation would be to update your .htaccess on the server to something like if domain comes from .biz redirect to the alternate .com.au domain.

    That way it’ll always do a redirect and your SEO isn’t going to get messed up.

    Regards,

    Carl.

  • #3 / Aug 20, 2012 6:13am

    Steven Grant

    894 posts

    I’ll second Carl’s recommendation of the .htacess route

    We do this for http://www.crmfont.co.uk

    # Secure .htaccess file
    <Files .htaccess>
    order allow,deny
    deny from all
    </Files>
    
    AddType video/ogg .ogv
    AddType video/mp4 .mp4
    AddType video/webm .webm
    
    AcceptPathInfo On
    
    Options -Indexes
    
    # Dont list files in index pages
    IndexIgnore *
    
    <IfModule mod_rewrite.c>
    RewriteEngine On
    
    RewriteCond %{HTTP_HOST} ^(www\.)?crmfont\.co.uk$ [NC]
    RewriteRule .* <a href="http://www.charles-rennie-mackintosh-font.co.uk%{request_uri}">http://www.charles-rennie-mackintosh-font.co.uk%{request_uri}</a> [R=301,L]
    
    Options +FollowSymLinks
    
    # Force the www 
    RewriteCond %{HTTP_HOST} !^www\.
    RewriteRule ^(.*)$ <a href="http://www.%{http_host}/$1">http://www.%{http_host}/$1</a> [R=301,L]
    
    RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?charles-rennie-mackintosh-font.co.uk [NC]
    RewriteRule \.(eot|svg|ttf|woff)$ - [NC,F,L]
    
    # Looks for files and directories that do not exist
    # and provide the segments to the index.php file
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond $1 !^/index.php
    RewriteCond $1 !.(css|js|png|jpe?g|gif|ico)$ [NC]
    RewriteRule ^(.*)$ index.php/$1 [L]
    </IfModule>  
    
    # Remove IE image toolbar
    <FilesMatch "\.(html|htm|php)$">
    Header set imagetoolbar "no"
    </FilesMatch>
  • #4 / Aug 20, 2012 8:57am

    GDmac - expocom

    350 posts

    What Carl, says: duplicating content on multiple domains (e.g. foo.com/news/ the same as bar.com/news/) will probably not be optimum for SEO score. (and really want to redirect those .biz requests to the original .com.au domain).

    That being said, if you really want the links on the website to keep pointing to the current domain-name someone is visiting, then you need to setup a second directory for that domain with cPanel (or DirectAdmin or Plesk). Put in a copy of index.php and set the $assign_to_config[‘site_url’] = ‘http://example.biz/’; This will override the site_url setting, (also set the $system_path to the system-directory with your installed EE system). See: http://ellislab.com/expressionengine/user-guide/cp/sites/domainsetup.html

  • #5 / Aug 20, 2012 4:59pm

    Shane Eckert

    7174 posts

    Hey Damien,

    Looks like the community is really helping out here!

    I have moved your thread over to Community Help where I am sure you are going to get some more input and suggestion.

    Cheers,

  • #6 / Aug 20, 2012 11:14pm

    Damien Buckley

    62 posts

    Thanks guys - the htaccess did the trick.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases