Question mark in image URL?

I am urlencoding my image names and all goes well unless there is a question mark in image.

Example:

http://example.com/public/images/bob%5timm.jpg -- WORKS

http://example.com/public/images/ralph%5testtext%3F.jpg -- REDIRECTS

Anyone know why it is redirecting instead of showing the image?

EDIT: The redirection is caused by the ACL. The real error is: "ImagesController handler class cannot be loaded."



17.6k

I cannot see nothing, I get only a Example domain warning. Whatever, it looks like:

1) You don't have a ImagesController controller created, or you haven't include it in the right controllers directory.

2) You didn't autoload the controllers directory.

After writting that, I really don't think so that the error is one of the above ('cause of the first working URL).

Yes, none of those would make a difference since the other images work, just not the one that has a question mark in it (%3F).



82.3k

This rule in your .htaccess checks if the file exists and if not it sends the request to Phalcon:

AddDefaultCharset UTF-8
<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f #Check if the file does exist and serve it
    RewriteRule ^(.*)$ index.php?_url=$1 [QSA,L]
</IfModule>

So probably, the web server is transforming the request from http://example.com/public/images/ralph%5testtext%3F.jpg to http://example.com/public/images/ralph%5testtext?.jpg which is handled completely different