Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Problems with Friendly Urls add-on

edited July 2006 in Vanilla 1.0 Help
Hi all, I'm having some troubles with the friendly urls add-on, I have had these since 0.92 but was hoping it was fixed with the release of 1.0 The thing is: After installing nothing happens... No errors, no rewrite, no nothing. Everything stays exactly the same :-) I've tried putting the line that should activate the Urls in all settings files (conf/settings.php, appg/settings.php etc) but it just doesn't matter. I have mod-rewrite installed and working on my blog etc. so that isn't the issue. It just looks like Vanilla doesn't respond to the command cause all internal links still point to the dynamic locations. Anyone knows what I am doing wrong and how I can correct it? Thnx, Jammer


  • lechlech Chicagoland
    It's quite possible that if you're using wordpress or similar, it's likely intercepting all requests to your forum and rewriting them before Vanilla's rules are considered. I'm no expert in mod_rewrite, but I do know that .htaccess files inherit rules set by parent folders lower in the chain. You can quickly test to see if this is happening by simply renaming your blogs .htaccess file to something like "ht.access" or something where it's no longer a ".htaccess" filetype (as some hosts will accept proper names for whatever their reasons) and attempting to hit up your vanilla again to see if it's working. That should at least pin down the problem a bit. Someone with thorough mod_rewrite skills should be able to help afterwards. Also, go ahead and throw up the mod_rewrite rules you have set for the root directory of your blog. This can help nail down what to possibly replace it with and at the very least see what's going on at the moment.
  • What exactly is your problem?

    After adding "$Configuration['URL_BUILDING_METHOD'] = 'mod_rewrite';" in conf/setting.php, the link to the search page for exemple should be search/. If it is still search.php, the problem is from vanilla.

    If it works but the links send you to the wrong page or to a 404 error message, the problem is from the rewrite rules or from mod_rewrite.
  • lechlech Chicagoland
    edited July 2006
    Dino, if you know mod_rewrite well, you would have to escape something like this dropped by wordpress but still allow both wordpress and vanilla to play nicely together.

    RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L]

    I personally think the best way would be to just slot /forum/ in one folder and /blog/ in another, but that's me. If it throws a 404, wordpress/blog rules are chewing it up before it hits, if it's a 500 then there's some htaccess restrictions in place. If nothing happens, it could be either or and the only way to know for sure is by checking the local error logs.

    Man, I can't wait for swell.
  • I don't know mod_rewrite well, I learn it some weeks ago for vanilla. Regular expression were very scary before.
  • lech, same here.......i am saliviating at the prospect of Swell. I presently use the excellent Nucleus for my blog at my website.but Swell woudl mean that everything looks vanilla.
  • A bit late reply: I am using Vanilla on a subdomain, it's really Vanilla (or me) doing something wrong. The search-url as Dino-boff says is still search.php and not search/ It looks like the command in my /conf/settings.php just doesn't get triggered...
  • you need Mark's help
  • Ok I just solved it myself :-) The conf/settings.php is included at the bottom of appg/settings.php. It is solved by putting the $Configuration['URL_BUILDING_METHOD'] = 'mod_rewrite'; before the rewrite rules in the appg/settings.php file, either by including the conf/settings.php at the top or by putting the URL_BUILDING_METHOD directly before the URL Rewriting definitions. Hope this helps for others :)
This discussion has been closed.