Excluding location from rewrite
June 20, 2014 07:36PM
I'm running a VBulletin forum on my webserver, and in order to leverage the VBSeo plugin (which rewrites thread paths into more search engine friendly paths), I had to add these rewrites to "location /".

location / {
rewrite ^/((urllist|sitemap_).*\.(xml|txt)(\.gz)?)$ /vbseo_sitemap/vbseo_getsitemap.php?sitemap=$1 last;

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

This works fine for all locations that are controlled by Vbulletin, but if I were to add my own php file within my site root, I can not seem to get it to be served by nginx. What I'm looking to do is run a few custom php pages that will not be forwarded through the VBSeo rewrites, but I'm not sure how to do that.

I'm looking to add /donate as a location that is not included in the above rewrites, and serve index.php from within that directory. Any help or suggestions are much appreciated. I am by no means a webserver expert, and I'm still relatively new to nginx.
Re: Excluding location from rewrite
February 24, 2015 11:17AM
Having the same problem. Never did figure this out.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 269
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready