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

Location try_files and friendly URLs

$
0
0
Hi, I hope someone answer my question.

For you guys this can be very simple but I'm a NginX beginner.

I do have a website, which is not Worpdress, installed NginX and PHP FastCGI

Everything is ok, but I do use friendly URLs and can't get to work.


The real url is: http://www.mywebsite.com/index.php?type=nuts;

When someone click on http://www.mywebsite.com/nuts the url above should open.

I managed to make it work doing this:

location /nuts {
try_files $uri $uri/ /index.php?type=nuts;
}


But that's not really good code because I have more than a hundred types. I can't write a block for each type. How can I fix 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>