Htaccess for Alias

CLOSED

Htaccess for Alias

Postby marcelloma » Fri Mar 18, 2011 7:24 am

Hello!

I have a domain http://www.domain.com on which some url are set up as alias
http://www.alias1.com
http://www.alias2.com

What I wanna do is when I go to
http://www.alias1.com/page.php

I would like the website to show me the file at /sites/www.alias1.com/page.php

So far I've come up with this
Code: Select all
RewriteCond %{HTTP_HOST} ^www\.alias1\.com$
RewriteCond %{REQUEST_URI} (.*)
RewriteRule ^(.*)$ /sites/alias1/%1 [L]


But gives me Error 500 !

It works only if the last line doesn't have rewrite rules, like
Code: Select all
RewriteRule ^$ /sites/alias1/%1 [L]
how can I make it general?
Thank you!
Marcello
marcelloma
 
Posts: 9
Joined: Sat Sep 12, 2009 4:14 am

Return to New Threads/Problems

Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest

cron