mod_rewrite subdomains and subdirectories

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

 



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@xxxxxxxxxxxxxxxx
  "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux