View Single Post
Old 11-03-2002   #2
Edd
Members
 
Join Date: Oct 2002
Location: Deadwood, you Cocksucker!
Posts: 833
Default

Quote:
Originally posted by SmutNames@Nov 3 2002, 06:33 AM

RewriteEngine On

# a ServerName derived from a Host: header may be any case at all
RewriteMap lowercase int:tolower

## deal with normal documents first:
# allow Alias /icons/ to work - repeat for other aliases
RewriteCond %{REQUEST_URI} !^/icons/
# allow CGIs to work
RewriteCond %{REQUEST_URI} !^/cgi-bin/

# do the magic
RewriteCond ${lowercase:%{SERVER_NAME}} ^.*\.[a-z-]+\.com$
RewriteRule ^(.+) ${lowercase:%{SERVER_NAME}}$1 [C]
# now create the real file name
RewriteRule ^.*\.([a-z-]+\.com)(.*) /www/hosts/$1/$2

## and now deal with CGIs - we have to force a MIME type
RewriteCond %{REQUEST_URI} ^/cgi-bin/
RewriteRule ^(.+) ${lowercase:%{SERVER_NAME}}$1 [C]
RewriteRule ^.*\.([a-z-]+\.com)(.*) /www/hosts/$1/$2 [T=application/x-httpd-cgi]
Smutnames -

I've got an idea for you to try - seems you have only one rule -
RewriteRule ^.*\.([a-z-]+\.com)(.*) /www/hosts/$1/$2

which, if I'm reading it right says to take
whatever.whatever.com and redirect it - so make another rule
and drop the first whatver, and put the rule just after the first one!
RewriteRule ^.\([a-z-]+\.com)(.*) /www/hosts/$1/$2

just a though - my modrewrite skills aren't that sharp...

tryHERE and HERE for more infos!
__________________

You can't just cut the throat of every Cocksucker who's character it MIGHT improve!
Edd is offline   Reply With Quote