httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jason Williard" <>
Subject [users@httpd] Rewrite/RedirectMatch Issues
Date Fri, 03 Feb 2006 08:27:02 GMT
I have been having trouble getting some Rewrites or Redirects to work.  Here
is what I am trying to do: -> -> ->

The ##### represents a string of 5 digits (US zip code).  The @@@@@ string
represents any text (aimed at the name of a city).

Here is what I currently have.  I've gone through many changes, but this
seems to be the closest to working properly:

  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

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

Here are the rules for that:

RewriteRule  ^weather/$
cgi-bin/weather/hw3.cgi?forecast=asus01&use_map=us_c_sm_albers2 [NC]
RewriteRule  ^weather/([0-9]{5})    cgi-bin/weather/hw3.cgi?pands=$1
RewriteRule  ^weather/([A-Za-z]+)   cgi-bin/weather/hw3.cgi?pands=$1

Thank You,
Jason Williard

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