sharktech
By:
sharktech

NGiNX: Remove ".php" from URL

July 21, 2015 3.6k views
DNS PHP Nginx

When using NGiNX, how can I remove the ".php" from my website URLs?

1 Answer

Hey,

location / {
    try_files $uri $uri.php $uri/;
}

Should work. You have to put it at your hostconfig :-)

-Alenan

Have another answer? Share your knowledge.