subdomains ???

New to mod_rewrite? This is a good place to start.

subdomains ???

Postby Guest » Tue Aug 20, 2002 2:36 am

i cand get subdomains to work
why ??
im a beginner in mod_rewrite

i have this code in ad .htaccess bot i dossent work
(Sorry im not good af englist)

RewriteEngine on
RewriteMap lowercase int:tolower

RewriteCond ${lowercase:%{HTTP_HOST}} !^$
RewriteCond ${lowercase:%{HTTP_HOST}} !^www\.fastweb.dk$

RewriteCond ${lowercase:%{HTTP_HOST}} ^(www\.|)([^.]+)\.fastweb\.dk$
RewriteRule ^(.+) ${lowercase:%{HTTP_HOST}}$1 [C]
RewriteRule ^(www\.|)([^.]+)\.fastweb\.dk(.*) /var/www/fastweb/$2$3 [L]

RewriteCond ${lowercase:%{HTTP_HOST}} ^(www\.|)[^.]+\.[^.]+\.fastweb\.dk$
RewriteRule ^(.+) ${lowercase:%{HTTP_HOST}}$1 [C]
RewriteRule ^(www\.|)([^.]+)\.([^.]+)\.fastweb\.dk(.*) /var/www/fastweb/$3/$2$4 [L]

i get a 500 site error on this script
i want it to bee like
all the users maps are in /var/www/fastweb/username
username is the map the user have.
i shult work at http://www.fastweb.dk/username <== it works now
http://username.fastweb.dk <== this do not work
http://www.username.fastweb.dk <== this do not work
and http://www.fastweb.dk shuld also work at /var/www/fastweb.dk and not like /var/www/fastweb/www

plzz help some one
Guest
 

Return to Beginner's Corner

Who is online

Users browsing this forum: No registered users and 10 guests

cron