I want to rewrite the url in nginx so that the .php extension can be omitted.
.php
This is what I have, but this isn\'t working for me. Anyone any idea how to do
Spent a while trying to get this to work properly. Both php files and other assets working:
location / { if (!-e $request_filename){ rewrite ^(.*)$ /$1.php; } try_files $uri $uri/ /index.php?$query_string; }