filename going to a different file per domain name

Using a single web hosting account to host multiple sites

filename going to a different file per domain name

Postby cfedge » Sat Mar 10, 2007 7:50 pm

Hello,

I have a few domains going to one folder.

Is it possible to do something like this:


domain1.com/domain.html would actually point to domain1.com/my/domain1.html

domain2.com/domain.html would actually point to domain2.com/my/domain2.html

etc

Thanks!

Randy
cfedge
 
Posts: 3
Joined: Sat Mar 10, 2007 7:46 pm

Postby richardk » Sun Mar 11, 2007 6:02 am

Then try the following in a .htaccess file in your document root
Code: Select all
Options +FollowSymLinks

RewriteEngine On

RewriteCond %{HTTP_HOST} ^(www\.)?(domain1|domain2)\.com$ [NC]
RewriteRule ^domain\.html$ /my/%2.html [QSA,L]
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am


Return to Domain Handling

Who is online

Users browsing this forum: No registered users and 26 guests

cron