Very long url for pages

Hi, in the userlog of my website I find very long url’s like:
http://altejeda.com/V4.0/Posts/index/html/html/html/html/html/html/html/html/html/html/images/html/html/html/html/html/html/html/html/images/altenaprenta.jpg

This doesn’t look normal to me. Does it? What could be the cause of this?

Thanks
Gerard.

I find that poorly-coded bots sometimes get confused by relative URLs and request things that don’t really exist. Also quite possible that something on your site is poorly coded, leading to pages being incorrectly referenced (but perhaps still “correctly” serving the content, due to some bit of configuration being particularly accommodating). Do you see things like this with varying numbers of /html in them, or is it always the same number?

Hi Zuluru, it looks like the site is unreachable at the moment. I hope I can find out soon…

Varying numbers like:
http://altejeda.com/V4.0/Posts/index/html/html/html/images/html/html/html/html/html/images/html/html/images/html/almere.htm
:thinking:
The strange thing is the links really work…

I’ve had urls go haywire when I’ve lost control of my program logic. It might be related to someplace where you are using

$this->redirect($this->referer));

If the referer was the same action that triggers the redirect, you can get wildly expanding urls.

public function circular() {
   //some code here
   if (true) {
      $this->redirect($this->referer));
   }
}

I use the posts-controller inside another page and call it through an ajax-call.
Maybe that messes it up?

It’s not impossible. If you are doing a string manipulation to make a url and lose control of some string replacement in you javascript…

It’s tough to say when you just have some random log entries to go on.

Could also be regex matching in .htaccess or your Cake route configuration, have you got anything non-standard in either of them?