httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joshua Slive <>
Subject Re: [users@httpd] Rewrite/RedirectMatch Issues
Date Fri, 03 Feb 2006 20:06:42 GMT
On 2/3/06, Jason Williard <> wrote:

>   Redirect        /index.php
>   RedirectMatch   ^/([0-9]{5})$1
>   RedirectMatch   ^/([A-Za-z]+)$1
> The problem with this is the last line is interpreting "index.php" as
> "/index" and appending that to the end.  The second line works perfectly.
> How can I get the last line to work without seeing index.php, or index, as a
> match?

I think you need to tag $ on the end of your regexes to indicate the
end-of-string.  Otherwise any trailing characters will match.

> Also, when it gets to$1, I am experiencing a
> similar issue.  The images/ folder is in a folder called weather/.  So, with
> the rules that I have in place, the images are not showing up.  I'd like to
> know if there is a way to follow the rules while excluding the weather
> folder.

Do you mean you want to exclude the "images" folder?  If so, you can
add something like
RewriteRule ^weather/images - [L]
at the top.  Otherwise, I can't understand what you are asking.


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