Help with rewrite

Mickie D nginx-forum at nginx.us
Sun Sep 4 22:46:18 UTC 2011


Hi everyone,

I am using a plugin for my site called VBSEO

They use the following code:

--------------------------------------------------------
 if ($request_filename ~ "\.php$" ) {
 rewrite ^/(.*)$ /vbseo.php break;
 }
 if (!-e $request_filename) {
 rewrite ^/(.*)$ /vbseo.php break;
 }
--------------------------------------------------------

I read the article about IF IS EVIL and thought it would be better to
make this code better.

Could someone who knows about the rewrites and nginx coding please help
me.

I will post the results (if it's possible of course) to VBSEO so they
can update there rules.

Kind Regards
Mick

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,214761,214761#msg-214761



More information about the nginx mailing list