one hosting 2 domains one being password protected.

Using a single web hosting account to host multiple sites

one hosting 2 domains one being password protected.

Postby create.tistiy » Fri May 29, 2009 11:29 am

I have one hosting account on

then on i have a folder

I want to mask and show only in the url bar

this works fine but it shows the page then asked for the passwords (Im using .htpasswd).. i might need to wait longer for the changes to take effect... does the below code look okay for what i need...
Code: Select all
Options +FollowSymLinks
RewriteEngine On

RewriteCond %{HTTP_HOST} ^(www\.)?domain2\.com$ [NC]
RewriteCond %{DOCUMENT_ROOT}/folder%{REQUEST_URI}/ -d
RewriteRule [^/]$ %{REQUEST_URI}/ [R=301,L]

RewriteCond %{HTTP_HOST} ^(www\.)?domain2\.com$ [NC]
RewriteRule ^(.*)$ /folder/$1 [QSA,L]

Thanks in advance for your help....
Posts: 4
Joined: Fri May 29, 2009 9:17 am

Postby richardk » Sat May 30, 2009 9:43 am

The mod_rewrite is fine.
Is the password protection in /folder/.htaccess?
Has it sorted itself out?
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 5 guests