I've got a quick situation that I need help with. I'm using nginx and I'm really new to the system, and need a rewrite rule that would rewrite the following: http://website.com/folderName/somePage.php to http://website.com/somePage Please note that somePage will change depending on the file. How can I make it globally recognizable instead of having to make a separate rewrite rule for each page? Can you please fix this code?
I've used the following:
rewrite ^/$ /FolderName/$.php last;
The above line doesnt work and nginx fails to restart
Any help would be great!
Thanks so much in advance. :)