Welcome! Log In Create A New Profile

Advanced

Location try_files and friendly URLs

Posted by fatorxb2 
Location try_files and friendly URLs
April 17, 2015 10:24PM
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.



Edited 1 time(s). Last edit at 04/17/2015 10:33PM by fatorxb2.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 141
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready