PHP to Apache - Friendly URLs fail with VBulletin

mkools nginx-forum at nginx.us
Wed Aug 20 21:39:23 UTC 2014


I'm using nginx for all static web content and forward all PHP requests to
Apache. This works great when I type e.g. http://domain.com/index.php.

However, vbulletin will convert any link to e.g.:
http://domain.com/threads/threadtopic or
http://domain.com/search.php?do=getnew.
So no more .php extension and when I click the topic now it just reloads the
forum's main page where I already was.

How can I tell nginx to also forward *.php? to apache? And how to handle the
vbulletin rewrites? Do I need to move the .htaccess to nginx?

Here's my .htaccess

# VBulletin Mod Rewrite Friendly URLs

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d

RewriteRule ^.*$ - [NC,L]

RewriteRule ^threads/.* showthread.php [QSA]
RewriteRule ^forums/.* forumdisplay.php [QSA]
RewriteRule ^members/.* member.php [QSA]


Thanks!!

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



More information about the nginx mailing list