The first step is adding a catch to handle some legacy requests for vBulletin to your generic php capture
You should have something like the following:
Code:
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 # location ~ \.php$ { fastcgi_split_path_info ^(.+\.php)(/.+)$; # NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini # With php5-cgi alone: #fastcgi_pass 127.0.0.1:9000; # With php5-fpm: fastcgi_pass unix:/var/run/php5-fpm.sock; fastcgi_index index.php; include fastcgi_params; }
Code:
location ~ \.php$ {
Code:
#vBulletin Legacy Rewrites if (!-f $request_filename) { rewrite ^[COLOR=red]$PATH$[/COLOR]/(.*)$ [COLOR=red]$PATH$[/COLOR]/index.php?routestring=$1 break; }
Code:
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 # location ~ \.php$ { fastcgi_split_path_info ^(.+\.php)(/.+)$; # NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini # With php5-cgi alone: #fastcgi_pass 127.0.0.1:9000; # With php5-fpm: fastcgi_pass unix:/var/run/php5-fpm.sock; fastcgi_index index.php; include fastcgi_params; #vBulletin Legacy Rewrites if (!-f $request_filename) { rewrite ^[COLOR=red]$PATH$[/COLOR]/(.*)$ [COLOR=red]$PATH$[/COLOR]/index.php?routestring=$1 break; } }
Code:
## vbulletin rewrites #CSS Rewrite location = [COLOR=red]$PATH$[/COLOR]/css\.php { rewrite ^ [COLOR=red]$PATH$[/COLOR]/core/css.php break; } # make install available from presentation location ^~ [COLOR=red]$PATH$[/COLOR]/install { rewrite ^[COLOR=red]$PATH$[/COLOR]/install/(.*)$ [COLOR=red]$PATH$[/COLOR]/core/install/$1 redirect; } # any request to not existing item gets redirected through routestring location [COLOR=red]$PATH$[/COLOR]/ { if (!-f $request_filename) { rewrite ^[COLOR=red]$PATH$[/COLOR]/(.*)$ [COLOR=red]$PATH$[/COLOR]/index.php?routestring=$1 last; } } # make admincp available from presentation location ^~ [COLOR=red]$PATH$[/COLOR]/admincp { if (!-f $request_filename) { rewrite ^[COLOR=red]$PATH$[/COLOR]/admincp/(.*)$ [COLOR=red]$PATH$[/COLOR]/index.php?routestring=admincp/$1 last; } } ## end vBulletin normal rewrites
If you ran your site as example.com/forums/ You'd have to replace $PATH$ with /forums for every occurance, an example of the change would be
Code:
# make admincp available from presentation location ^~ /forums/admincp { if (!-f $request_filename) { rewrite ^/forums/admincp/(.*)$ /forums/index.php?routestring=admincp/$1 last; } }