Search code examples
.htaccessaliasconcrete5

.htaccess alias, but not redirect


I have a CMS (Concrete5) and I have switched on "nice urls"...

for example, http:/ /www.mydomain.at/test/ is http:/ /www.mydomain.at/index.php?cid=1 in dir /var/www/user1/www.mydomain.at/

now i want to use a mobile-template

http:/ /mobile.mydomain.at/test/mobile-version/ in dir /var/www/user1/mobile.mydomain.at/

that should be an alias of http:/ /www.mydomain.at/test/mobile-version/

i dont want a redirect, it should be an alias...

please help - thx a lot


Solution

  • enable Mod_Proxy than add these lines to .htaccess in Mobile-version folder:

    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^mobile\.mydomain\.at$ [NC]
    RewriteRule (.+)$ http://www.mydomain.at/$1 [L,P]