Dom 
Member 
 
Registered: 13th Sep 03
 
User status: Offline 
 
 | 
 
ive got domain2 point to domain1 using 
 
code:
  
RewriteEngine On 
RewriteBase / 
 
RewriteCond %{HTTP_HOST} domain2.co.uk 
RewriteCond %{REQUEST_URI} !(domain 2)/ 
RewriteRule ^(.*)$ (domain2 dir)/$1 [L] 
  
  
 
works a treat, however ive added a sub domain to domain2, lets call it zzz, using the following code 
 
code:
  
RewriteEngine On 
RewriteBase / 
 
RewriteCond %{HTTP_HOST} zzz.domain2.co.uk 
RewriteCond %{REQUEST_URI} !(domain2 dir)/zzz/ 
RewriteRule ^(.*)$ (domain2 dir)/zzz/ [L] 
 
RewriteCond %{HTTP_HOST} domain2.co.uk 
RewriteCond %{REQUEST_URI} !(domain 2)/ 
RewriteRule ^(.*)$ (domain2 dir)/$1 [L] 
  
  
 
and although domain2 works fine, the sub domain doesnt want to know   keeps asking for "/(domain2 dir)/zzz/zzz/zzz", which obviously doesnt exist...only "/(domain2 dir)/zzz" exists as a directory, and even then it cant seem to get the index file placed in there. 
 
only way i have got it work is using www.(domain2).co.uk/zzz....but that beats the point of having a sub-domain   
 
anyone got any clues?? 
 
the only thing i can think of is that when a sub domain is created via cPanel, it creates a directory with that name, and the server is getting confussed   though even placing an html file in that folder, it still asks for "/(domain2 dir)/zzz" which again doesnt exist   
 
cheers all 
 
Dom  
 |  
Tim 
Site Administrator
 
Registered: 21st Apr 00
 
User status: Offline 
 
 | 
 
It's looping because you've missed the $1 from the zzz RewriteRule... 
 |  
Dom 
Member 
 
Registered: 13th Sep 03
 
User status: Offline 
 
 | 
 
hmmmm, 
 
did that and it still caused a 404, saying the url (domain2 dir)/zzz/zzz/ couldnt be found etc. 
 
So i took out the zzz bit in the htaccess, and its asking for (domain2 dir)/zzz/, which does exist, but its still giving a 404   
 
any ideas?
 |  
 
 |