[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cobalt-users] .htaccess doesn't work with mod_rewrite



I've set up a rewrite rule to direct subdomains automatically to their 
folder, as shown below:

<VirtualHost 216.40.195.62>
ServerName www.auz.it
ServerAdmin admin
DocumentRoot /home/sites/site4/web
ServerAlias auz.it, *.auz.it

RewriteEngine on
RewriteMap	lowercase	int:tolower
RewriteCond ${lowercase:%{HTTP_HOST}}	(www\.|)[^.]+\.auz\.it$
RewriteCond ${lowercase:%{HTTP_HOST}}	!^auz.it?$
RewriteCond ${lowercase:%{HTTP_HOST}}	!^www.auz.it?$
RewriteRule ^(.+)	${lowercase:%{HTTP_HOST}}$1	[C]
RewriteRule ^www\.daniel\.auz\.it(.*)
	/home/sites/site4/users/danielabel/web/$1
RewriteRule ^daniel\.auz\.it(.*)
	/home/sites/site4/users/danielabel/web/$1
RewriteRule ^(www\.|)([^.]+)\.auz\.it(.*)	/home/sites/site4/sites/$2$3
RewriteOptions inherit

AliasMatch  ^/~([^/]+)(/(.*))? /home/sites/site4/users/$1/web/$3

AccessFileName .htaccess

AddType application/x-httpd-php .php3
AddType application/x-httpd-php .php4
AddType application/x-httpd-php .php
# AddHandler chiliasp .asp
# AddHandler chiliasp .asa
AddHandler cgi-script .cgi
AddHandler cgi-script .pl
#AddHandler cgi-wrapper .cgi
#AddHandler cgi-wrapper .pl
AddHandler server-parsed .shtml
AddType    text/html     .shtml
</VirtualHost>

I've got cgi to work with it however, it will not process any .htaccess files 
for the subdomains, only working for the core domain auz.it and www.auz.it 
(comes up with a "The page cannot be displayed" internet explorer error).

How can I get the re-written subdomains to process .htaccess files?

James Austin.