I have a thumbnail class and it accepts external hosts too. It works like this right now :
http://mysite.com/resize/src=http://google.com/logo.png&w=50&h=50
I want to make it clean url with my “resize.mysite.com” subdomain like this :
http://resize.mysite.com/400x200/http://google.com/logo.png
I almost done it with this rewrite rule :
rewrite ^/([^x]*)x([^/]*)/(.*)$ /resize.php?w=$1&h=$2&src=$3 last;
But it’s sending “src” without second slash after “http:” and it causes to resize class error, like this :
http:/google.com/logo.png
http://google.com/logo.png (what I expect)
How this can be fixed?
The first thing comes in mind is that your are using somewhere in your
nginxconfiguration file special directivemerge_slashes, is it true? If yes and your are usingmerge_slashes onthen all your requests with double or triple and so on slashes will comes as one slash.Can it be a solution to your problem to set directive
merge_slashes off?