httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joshua Slive <jsl...@gmail.com>
Subject Re: [users@httpd] Issues with Rewrite
Date Thu, 02 Sep 2004 22:54:23 GMT
On Thu, 02 Sep 2004 13:52:38 -0700, Richard Crawford
<rcrawford@unexmail.ucdavis.edu> wrote:
> I have the following bit of code in my httpd.conf file:
> 
> RewriteEngine on
> RewriteCond %{THE_REQUEST} !=*.pl
> RewriteRule /DLC/ /cfmx/DLC/ [L]
> 
> This is support to redirect all requests for a URL containing DLC to
> /cfmx/DLC, *unless* the file requested is a Perl file.
> 
> Unfortunately, it doesn't seem to work at all.  I've tried browsing to
> http://mysite.com/DLC, expecting to see http://mysite.com/cfmx/DLC, but
> this didn't happen.

Well, "/DLC" does not match "/DLC/" to start with.  And using "="
implies an exact text match, which is not what you want.

What you probably want is something more like

RewriteCond %{THE_REQUEST !\.pl$
RewriteRule ^/DLC(.*) /cfmx/DLC$1 [L]

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