there are dozens of similar question in the internet (stackoverflow and other sites), but none of them worked for me.
I am trying to rewrite my URL to get rid of the .php extension at the end. I already tried the common rewrites in my config.
I hope somebody knows an answer i did not use yet.
2
Answers
you can use .htaccess
make a new file in the directory which your PHP files are there, make a new file called
.htaccess
, put in the following in there:In your vhost config file or nginx.conf file, add the following lines in the inside server block :
Need to restart Nginx before use.