httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Richard Crawford <>
Subject Re: [users@httpd] Issues with Rewrite
Date Fri, 03 Sep 2004 17:46:55 GMT
Joshua Slive wrote:

> On Thu, 02 Sep 2004 13:52:38 -0700, Richard Crawford
> <> 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
>>, expecting to see, 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.

That seems to be closer.  It gives me 404 errors if I try to browse to
pages of the form, which is better than showing
the Cold Fusion source code of the page.  However, it also breaks pages
that retrieve stylesheets or JavaScript or includes by calling them from
the web document root (e.g., javascript

Richard S. Crawford
Programmer III: Oracle/Solaris Wrangler
UC Davis Extension Distance Education Group (
2901 K Street, Suite 200C
Sacramento, CA  95816

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message