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.

Multiple Domains, htaccess internal redirect

May 30, 2009 11:38pm

Subscribe [1]
  • #1 / May 30, 2009 11:38pm

    Kev-O

    50 posts

    Well, I’ve been developing sites for a year a half now and have been lucky enough to have dodged any major htaccess hacks… until now.  I know that the official EE support for multiple domains is MSM, but my client just simply wants a 6 page sub-site with a separate domain.  So I thought I could do a little htaccess trickery and solve the problem, however, I’m just plain stuck. Hoping for some help…

    Basically:
    main-domain.com -> /site/index.php
    second-domain.com -> /a_folder/index.php

    I’d like the change to be transparent to the user, so the url still says http://www.second-domain.com.

    RewriteCond %{HTTP_HOST} ^second-domain.com$ [NC]
    RewriteRule ^(.*)$ <a href="http://main-domain.com/a_folder/$1">http://main-domain.com/a_folder/$1</a> [L]

    This works, and it points to the right place but…. it changes the visible url for the user and that is undesireable. My (very limited) understanding is that internal redirects are invisible to the user, right?  I’m a little lost, I’ve spent countless hours on this, grrrr,  would be very grateful for a little help.

    Thanks,

    -kev

  • #2 / May 31, 2009 3:02pm

    Greg Aker

    6022 posts

    Kev-O

    This really depends on how your host is setup.  Some (like EngineHosting) allow you to do subfolders as the doc root for another URL, while other you can’t.  Take a look at this Wiki Entry and see if that helps.

    Regards,

    -greg

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

ExpressionEngine News!

#eecms, #events, #releases