I set up a redirecrt for NginX like this:
location / {
try_files $uri $uri/ @rewrite;
}
location @rewrite {
rewrite ^/(.*)$ /index.php?permalink=$1 last;
}
it is working fine for thousands of links but for few it does not
Some of the links which keep throwing 404 error are:
- profile/monico
- profile/hotstar
- profile/jongz
- profile/chico
- profile/nagz
- profile/mico
- profile/star
For thousands of other profile/* links it works fine. I tried to access above profiles via:
index.php?permalink=profile/jongz
And it work fine.
So I assume there must be some misconfiguration or something which makes nginX to throw 404 - file not found error instead of proceeding to rewrite
function.
Does those links contain some characters or character combinations which prevents nginX to rewrite link correctly?