Re: [users@httpd] RewriteRule to redirect to one of many directories

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

 



On 7/6/06, Michael <mjross99@xxxxxxxxxxxxx> wrote:
Hello, everyone.  I've got a bunch of directories like
http://www.example.com/mem_AAA/mem_AAA.htm, where AAA is a member's initials.
 I'm trying to redirect all traffic to these directories to their new
location:  http://www.example.com/members/mem_AAA/mem_AAA.htm

So I've tried countless combinations of RewriteCond and RewriteRule.  E.g.:

RewriteEngine On
RewriteCond %{HTTP_HOST} \.example\.com
RewriteRule /mem_(.*)/mem_(.*).htm /members/mem_$1/mem_$2.htm [R=301,L]

RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.example\.com$
RewriteRule ^/mem_(.*)/mem_(.*) /members/mem_$1/mem_$2 [R=301,L]

Sadly, none have worked.  I've read the docs, and still don't see what I'm
doing wrong.

"None have worked" is not very descriptive.  Exactly what is in the RewriteLog?

Joshua.

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