Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

Rewrite and encode url

$
0
0
Hello,

I try to make an url rewriting wich rewrite all jpg|gif|png to a script.
I write this :
rewrite ^(.*)\.(jp?g|gif|png)$ $scheme://$host/redirection_image/afficher$1 last;

It's work, but if I pass a directory, $1 = /directory/image and I need to use an encoded url like /directory%2Fimage.

How I can make this ?

Thanks :)

Viewing all articles
Browse latest Browse all 4759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>