Nginx Rewrite rules are acting up
rewrite ^/(.*)$ http://site.com/$1 permanent;
rewrite ^/(.*)$ /$1.php;
This works fantastic but some of my scripting (mainly in oath) would prefer to allow the .php to pass through still, and now my images don't work no matter how they're linked.
Eventually I'll be needing to figure out how to write the rules to work for the wildcard DNS subdomain I stuff I have set up (as in user.site.com would be site.com/?uservar=user).
I'm fairly new to Nginx, luckily someone way smarter than myself in the arts of Nginx wrote a Wordpress port so my blog is working fantastic. Any help in this matter would be greatly appreciated. I tried my old working Apache rules in
1 Reply
if (!-e $request_filename) {
rewrite ^/(.*)$ /$1.php;
}
Now hopefully when the time comes I can get the user.site.com rule working.