httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Lerrahn <li...@penpal4u.net>
Subject [users@httpd] Redirecting paths with extra slashes
Date Sat, 08 Dec 2007 01:18:44 GMT
Hi,
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

/foo/bar

there might be one for

/foo///bar

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?

Cheers,
Christian

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