httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joshua Slive" <jos...@slive.ca>
Subject Re: [users@httpd] RewriteRule to redirect to one of many directories
Date Thu, 06 Jul 2006 17:45:47 GMT
On 7/6/06, Michael <mjross99@sbcglobal.net> 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@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