[users@httpd] using mod_rewrite for subdirectories

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

 



Hi, I am new to using mod_rewrite but I have used apache extensively in
the past.  I am interested in redirecting sub-directories to a host name
in the same domain.  Here is an example:

http://my.domain.com/externaldomain/  >  http://externaldomain.domain.com/

Here is another example:

http://www.test.com/firefox/ > http://firefox.test.com/


How would i go about writing the rule to match this and redirect this in
the virtual host container for www.test.com?  I have tried several
rulesets with no success so I'm clearly not understanding something
correctly.  I would also like to match against the trailing slashes in
case the users requested a file by mistake instead of the directory.


Also, how do you place multiple rulesets and redirects in the same
virtual host container?  If i want to redirect 20-30 of these
sub-directories how do I list them in the ruleset?

Thanks for your help!

Octavian Hornoiu
begin:vcard
fn:Octavian Hornoiu
n:Hornoiu;Octavian
email;internet:octavian@xxxxxxxxxxxxxx
x-mozilla-html:FALSE
url:http://kronophobia.sf.net
version:2.1
end:vcard


---------------------------------------------------------------------
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