0

My Yii2 application generates urls like this: http://example.com/map-image/1-map.jpg This is not a real jpg file but a dynamically generated jpg image. But nginx returns 404 error.

I want to pass /map-image/1-map.jpg to /index.php so that it can process the request.

If I remove .jpg from the url settings in Yii2 then it works. i.e. http://example.com/map-image/1-map works.

My nginx config is:

location / {        
    try_files $uri $uri/ /index.php?$query_string;
}
Future King
  • 135
  • 1
  • 8

0 Answers0