Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Pretty URLs or how do I get rid of: 'index.php?p=/' on nginx?
aarocco
New
Best Answer
-
aarocco New
OK boys:
The fix to my problem turned out to be relatively simple.
Addition to nginx config file:
location /forum {try_files $uri $uri/ @forum;}
location @forum {rewrite ^/forum(.+)$ /forum/index.php?p=$1 last;}
Restart nginx.
Change false to true in the Vanilla conf file:
$Configuration['Garden']['RewriteUrls'] = TRUE;
0
Answers
Two things:
$Configuration['Garden']['RewriteUrls'] = TRUE;
This blog is a sub-directory of an existing wordpress site. The wordpress site has pretty urls working, but when I try pretty urls on the forum it doesn't take.
Any idea why?
You need an .htaccess file. Vanilla ships with one that works in most cases. A lot of ftp programs will ignore this file when you upload because it begins with a
.
. Make sure the file is there and give it another try.make sure you ftp client has hidden files shown.
grep is your friend.
.htaccess is there, i don't use ftp, i use scp
I believe it is an issue with fastCGI not getting the path_info variable passed to it from nginx. i have a feeling this can only be rectified on nginx conf.
trying some variations of what is listed here: http://vanillaforums.org/discussion/9915/vanilla-on-nginx
will update if successful.
OK boys:
The fix to my problem turned out to be relatively simple.
Addition to nginx config file:
location /forum {try_files $uri $uri/ @forum;}
location @forum {rewrite ^/forum(.+)$ /forum/index.php?p=$1 last;}
Restart nginx.
Change false to true in the Vanilla conf file:
$Configuration['Garden']['RewriteUrls'] = TRUE;