httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Björn Heller" <hel...@elitehost.biz>
Subject [users@httpd] RedirectMatch wrongly matching single chars of a string?
Date Mon, 30 Jan 2006 23:47:20 GMT

Hi List, 

I've got following problem: 

I want to redirect all requests like
site.com/something,
site.com/something/someotherthing,
site.com/something/xyz/someotherthing 

to site.com/something.html, no matter if or without trailing slash BUT NOT 
if the URL is a .gif, .jpg etc. 

So I've got the following RedirectMatch: 

RedirectMatch permanent ^/(.[^/(\.gif)(\.jpg)]*)/? 
http://www.site.com/$1.html 

It works fine for anything after site.com/ NOT containing g, i, f, j, p or . 

e.g.:
site.com/xyzxyz -> site.com/xyzxyz.html
site.com/xxxx/yxyx -> site.com/xxxx.html 

but: site.com/xxgxx -> site.com/xx.html although I bracketed \.gif etc. 
What's wrong? Can anyone make a suggestion? 

greets, hb.

---------------------------------------------------------------------
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