Welcome! Log In Create A New Profile

Advanced

only .json file not load using rewrite or internal redirection cycle while internally redirecting

April 21, 2016 02:05AM
Hi,
In nginx conf file I have written:-

location /hello {
alias /var/www/html/hello/some_path/www;
try_files $uri $uri/ /helllo/some_path/www/index.html;
}

location ~ /hello/(.*)\.(css|js|html|eot|svg|ttf|woff|ico|png|map|json) {
try_files $uri $uri/ /hello/some_path/www/$1.$2;
}

So when I request a json file eg:-
http://localhost/hello/language/locale-en-us.json

it should be redirect to
http://localhost/hello/some_path/www/language/locale-en-us.json

But it not redirect to mentioned path.
Subject Author Posted

only .json file not load using rewrite or internal redirection cycle while internally redirecting

rahulgupta20nov April 21, 2016 02:05AM

Re: only .json file not load using rewrite or internal redirection cycle while internally redirecting

Maxim Dounin April 21, 2016 09:40AM

Re: only .json file not load using rewrite or internal redirection cycle while internally redirecting

rahulgupta20nov April 21, 2016 11:18PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 101
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready