corsasport.co.uk
 

Corsa Sport » Message Board » Off Day » Geek Day » web dudes - htaccess


New Topic

New Poll
  Subscribe | Add to Favourites

You are not logged in and may not post or reply to messages. Please log in or create a new account or mail us about fixing an existing one - register@corsasport.co.uk

There are also many more features available when you are logged in such as private messages, buddy list, location services, post search and more.


Author web dudes - htaccess
Dom
Member

Registered: 13th Sep 03
User status: Offline
4th Jul 05 at 16:27   View User's Profile U2U Member Reply With Quote

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

Avatar

Registered: 21st Apr 00
User status: Offline
4th Jul 05 at 16:31   View Garage View User's Profile U2U Member Reply With Quote

It's looping because you've missed the $1 from the zzz RewriteRule...
Dom
Member

Registered: 13th Sep 03
User status: Offline
4th Jul 05 at 16:54   View User's Profile U2U Member Reply With Quote

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?

 
New Topic

New Poll

  Related Threads Author Forum Replies Views Last Post
**Sunday 4th May Reebok Stadium @ 13:00 Be There** andy hirst Meets and Events 72 2994
7th May 03 at 16:03
by Kerry
 
Yo Dudes Nismo South Wales 14 649
6th Dec 03 at 08:57
by Nismo
 
*** MK Piss up!! Canncelled *** Pablo South Central 401 8408
15th Apr 04 at 16:01
by J 11ESY
 
does anyone know Jodi_the_g Geek Day 2 999
22nd Dec 04 at 02:26
by Ian
 

Corsa Sport » Message Board » Off Day » Geek Day » web dudes - htaccess 28 database queries in 0.0052550 seconds