NielsGouman
Member
So I've found this: http://xenforo.com/help/friendly-urls/ and I've tried adding that code over at my host.. And the host didn't allow that in my configuration.
Asked around and they said I'm not allowed to change location ~ \.php$, so I left that part out. Now the configuration could be saved, but all pages gave 404's.
Being the "never even heard of Nginx" guy I just tried leaving out other stuff, googling, and mixing in other code I could find. Eventually I fixed it by copying the friendly URLs code I used over at my WordPress install.. which is like so:
This works fine. BUT I've read all over this forum that "if" is evil, so how can I fix that?
Asked around and they said I'm not allowed to change location ~ \.php$, so I left that part out. Now the configuration could be saved, but all pages gave 404's.
Being the "never even heard of Nginx" guy I just tried leaving out other stuff, googling, and mixing in other code I could find. Eventually I fixed it by copying the friendly URLs code I used over at my WordPress install.. which is like so:
Code:
location / {
if (!-e $request_filename) {
rewrite ^(.+)$ / last;
break;
}
}
This works fine. BUT I've read all over this forum that "if" is evil, so how can I fix that?