Rewrite Voodoo pt. 2

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

 



Hi everyone,

We're experiencing some difficulty that I'm not entirely sure of
the origin of. Most URLs to content in a subdomain link through
the subdomain, but a few are linking a subdirectory of the main
domain instead

domain.ext/subdirectory/content.ext (the few)
subdomain.ext/content.ext (the many and preferred)

So I wrote the below for inclusion in the main domain .htaccess
file, it's off the top of my head so I'm wondering if anyone sees
anything wrong with it and if yes, how it would be fixed (watch
for line wrap):

RewriteEngine On
RewriteRule ^(www\.)?domain\.ext/subdomain/(.*)$ subdomain\.domain\.ext/$2 [R=301,L]


Reese




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