Forum: NGINX PHP to Apache - Friendly URLs fail with VBulletin

2974d09ac2541e892966b762aad84943?d=identicon&s=25 mkools (Guest)
on 2014-08-20 23:39
(Received via mailing list)
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
7a7c51366e39603df74feef200a3a1c1?d=identicon&s=25 Aleksandar Lazic (Guest)
on 2014-08-21 12:39
(Received via mailing list)
Hi mkools.

Am 20-08-2014 23:39, schrieb mkools:
>
> 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

[snipp]

Have you take a look at

http://nginx.org/en/docs/http/converting_rewrite_rules.html
http://nginx.org/en/docs/http/ngx_http_core_module...

or the worst case ;-)

http://lmgtfy.com/?q=vbulletin+nginx

=> First link in my response
https://www.vbulletin.com/docs/html/main/preparefiles_nginx

and as your now on learning and reading maybe this link will help you
too.

http://nginx.org/en/docs/http/request_processing.html

Cheers
Aleks
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.