Fork me on GitHub
Current release is 2.1.6 (21 Nov 2014).

Users who have not yet upgraded to 2.1 should get security release 2.0.18.14 (1 Nov 2014). We will stop providing these security releases to 2.0 at the end of this year.

Pretty URLs or how do I get rid of: 'index.php?p=/' on nginx?

edited March 2013 in Vanilla 2.0 Help

After a fresh move to a local vanilla installation, my routes are all ugly:

forum/index.php?p=/discussions/etc...etc...

How can I change these to pretty urls? Like:

forum/discussions/etc.. etc...

How do I make 'index.php?p=/' disappear?

Best Answer

  • edited December 2011 Answer ✓

    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;

Answers

Sign In or Register to comment.