httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Charles Palmer <char...@seekio.com>
Subject [users@httpd] mod_rewrite subdomains and subdirectories
Date Thu, 04 Jan 2007 19:16:45 GMT
Greetings:

I am currently attempting to get the following set up:

User goes to foo.bar.com
Server is set up for www.bar.com and *.bar.com
mod-rewrite is enabled
rewrite rules accept foo.bar.com and opens a sub-directory under / 
home/bar.com/htdocs named foo
User sees http://foo.bar.com and is served the information in /home/ 
bar.com/htdocs/foo

I have tried several variations and in the end I get a redirect that  
takes foo.bar.com and redirects me to www.bar.com/foo.bar.com

If someone would be interested in helping a r-tard in this apparently  
complicated task I would greatly appreciate it. Here is my syntax:



RewriteEngine On

RewriteCond %{HTTP_HOST} ^[^\.w{3}]+\.wl.example.com$
RewriteRule ^$ %{HTTP_HOST} [C]
RewriteRule ^([^\.w{3}]+)\.wl\.example\.com$ http://$1.wl.example.com/ 
$1 [R=301,L]

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message