httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Lerrahn <>
Subject [users@httpd] Redirecting paths with extra slashes
Date Sat, 08 Dec 2007 01:18:44 GMT
I have a site that for some reason got indexed by Google with wrong
paths which contain too many slashes. E.g. instead of an entry for


there might be one for


Now this is no problem for a Apache but it is for some of my pages
because they use relative paths. If I have an image
in /foor/bar/index.html which looks like

<img src=../../img/img1.jpg>

that will work fine for /foo/bar but not for /foo///bar which will then
look for /foo/img instead of /img.

What I would like to do is get Apache to redirect wrong addresses like
this to the correct one. That way I get the relative paths correct and
hopefully one day Google will have it right, too. I was thinking of
mod_rewrite but I couldn't get it to work. However, I only can get
rules that either don't seem to do anything or ones that get me into an
infinite loop of redirects. Can anybody give me a hint?


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