Saturday, 7 September 2013

nginx simple rewrite rules with php fastcgi

nginx simple rewrite rules with php fastcgi

I have nginx running on a VPS (php fastcgi) and want do be able to remove
.php from the files names.
So instead of index.php showing up, / shows up
or instead of contact.php, /contact/ shows up (notice the slash at the end)
Same thing for sub directories.
Is there a really super simple way to do this?
One of my bigger headaches has been to understand the .htaccess (apache)
vs .conf (nginx)
If I have mydomain.com/ and put a .conf file, will nginx recognize it?
meaning if I do this:
/home/mydomain.com/myconfig.conf will nginx recognize it?

No comments:

Post a Comment