Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Facebook Sign In with Google Sign In with OpenID Sign In with Twitter

Categories

In this Discussion

Who's Online 13

ericgillettefh111peregrinetc74 +9 guests

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

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?

Tagged:

Comments

  • Posts: 1,586

    Two things:

    1. Make sure pretty urls will work for your site. You can do this by browsing to a few pretty urls and make sure they come up properly.
    2. Edit the following config setting:
      $Configuration['Garden']['RewriteUrls'] = TRUE;

    Vanilla co-founder

  • 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?

  • Posts: 1,586

    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.

    Vanilla co-founder

  • x00x00
    Posts: 1,548

    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.

  • Posts: 4 Accepted 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;

Sign In or Register to comment.