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.

Messy URLs

edited July 2010 in Vanilla 2.0 - 2.8
I just downloaded the latest Vanilla to play around with it and see if I liked it. I'm using PHP 5.2 and MySQL 5.0. My question is why my URLs are looking so very messy. Right now, they're something like this: domain.com/index.php?p=/dashboard/settings/plugins

I'd like it if they were like the Vanilla forums here, and looking more like this: domain.com/dashboard/settings/plugins
Tagged:

Comments

  • ToddTodd Vanilla Staff
    @amwelles, your particular server configuration also needs to support nice urls which we check for on installation. You may need to edit your .htaccess file in the root of Vanilla 2.

    What host are you on? Can you give us your webserver and version from phpinfo()?
  • @Todd I'm running on NearlyFreeSpeech.net. I'm not entirely sure what info you need fro the phpinfo() file, so here it is: http://throwback.novembird.com/phpinfo.php

    I know I've installed other things and had to mess with the .htaccess file to get the clean URLs to work, I just can't recall exactly what I needed to do.

    Thanks!
  • ToddTodd Vanilla Staff
    edited November 2010
    Try the following:
    1. First, try entering a clean url in your browser to see if it works. This is how you should test everything, before editing your config.php
    2. If not, try editing your .htaccess file.
    3. There is a commented out RewriteBase in the file. Try uncommenting this and following the instructions in the comments.
    4. If that doesn't work try looking at your host's help for some tips specific to them here is one link
    5. If you can view clean urls then edit your /conf/config.php file and add $Configuration['Garden']['RewriteUrls'] = TRUE;
  • @Todd Oh my, I found that when I copied the files, it for some reason did not upload the .htaccess file at all, which would explain all this trouble. Thank you so much for your help!
  • ToddTodd Vanilla Staff
    Oh shoot. That's actually a pretty common gotcha that I should have thought of.

    If you're interested, it's because .htaccess starts with a '.' which means it's a hidden file in unix which means it doesn't copy.

    We should probably put a check in there on install actually.
  • How would you edit your .htaccess (after editing the conf/config.php) to do this? Right now the forum is installed in a domain.TLD/forum/ and the .htaccess is in that directory, however editing the conf/config.php alone results in errors (essentially 404's).
  • *bump* anyone?
  • TimTim Vanilla Staff
    What's the issue you're having? Your forum is using ?p=URL syntax and you want 'pretty' urls?

    You need:
    - Apache
    - htaccess support

    If you have both of these (confirmed), then do this:
    1) Put vanilla's default .htaccess file in the root of your vanilla install. That means your htaccess file should be sitting right next to your index.php and bootstrap.php files
    2) Edit conf/config.php
    Add $Configuration['Garden']['RewriteUrls'] = TRUE; at the end

    Your forum should now function with rewrite urls.

    Vanilla Forums COO [GitHub, Twitter, About.me]

  • hey tim, thanks for this reply. I did do that earlier this morning and the results were the same as before, however I edited my apache httpd.conf to include the following

    Options FollowSymLinks AllowOverride All

    After restarting apache, it worked.
Sign In or Register to comment.