multiple rewrite woes.... richardk/caterham help please? :(

Using a single web hosting account to host multiple sites

multiple rewrite woes.... richardk/caterham help please? :(

Postby sprockett » Sat May 13, 2006 7:48 pm

I've spent 6 hours searching thru the forum posts and googling and messing with my httpdconf trying to get this to work.. to no avail :(

Basically,

I have some rules set up:

RewriteRule ^/user/([[:alnum:]-_,\s,*,:]+)/music/$ /thisfolder/music.php?user=$1 [QSA,L]
RewriteRule ^/user/([[:alnum:]-_,\s,*,:]+)/movies/$ /thisfolder/movies.php?user=$1 [QSA,L]
RewriteRule ^/user/([[:alnum:]-_,\s,*,:]+)/others/$ /thisfolder/others.php?user=$1 [QSA,L]

This works perfectly.

Next i try to have SUBDOMAIN internal redirection,
so basically,

user.mydomain.com -----> mydomain.com/user/

I used this:
# Do subdomain redirects on spheres
RewriteCond %{http_host} ^([^.]+)\.myserver.com[NC]
RewriteCond %{http_host} !^doc.myserver.com [NC] #don't apply if doc
RewriteCond %{http_host} !^blog.myserver.com [NC] #don't apply if blog
RewriteRule ^(.*) /user/%1/ [QSA]

This works as well.

The problem comes when i try this:

user.mydomain.com/music/
user.mydomain.com/movies/
user.mydomain.com/others/

The earlier rules do not seem to work :(

For example,
user1.mydomain.com/music/ does not bring me to
mydomain.com/thisfolder/music.php?user=user1

it just redirects me to
mydomain.com/users/

Would appreciatae some guidance!

Thanks so much!
sprockett
 
Posts: 1
Joined: Sat May 13, 2006 6:56 pm

Postby richardk » Sun May 14, 2006 2:55 am

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 95 guests

cron