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.

How do I get rid of the ?p= in my URLs?

Hello Vanilla Forums.

I'm trying to install Vanilla on my website located at:

I recently uploaded Vanilla Garden From the install menu, I noticed the URL path as being . I felt as if I could change this later on and so, I continued with the installation, and now all my paths show up as:[route], where instead, they should be[route].

I did some research into pretty URLs, and have tried changing the .htaccess and conf/config.php files to settings proposed in different threads to no avail. After installation and no-editing, the 2 files are as shown...


# Modified
# If you modify this file then change the above line to: # Modified

   RewriteEngine On
   # Certain hosts may require the following line.
   # If vanilla is in a subfolder then you need to specify it after the /. 
   # (ex. You put Vanilla in /forum so change the next line to: RewriteBase /forum)
   # RewriteBase /
   RewriteCond %{REQUEST_FILENAME} !-d
   RewriteCond %{REQUEST_FILENAME} !-f
   RewriteRule ^(.*)$ index.php\?p=$1 [QSA,L]


// Conversations
$Configuration['Conversations']['Version'] = '';

// Database
$Configuration['Database']['Name'] = '***';
$Configuration['Database']['Host'] = '***';
$Configuration['Database']['User'] = '***';
$Configuration['Database']['Password'] = '***';

// EnabledApplications
$Configuration['EnabledApplications']['Conversations'] = 'conversations';
$Configuration['EnabledApplications']['Vanilla'] = 'vanilla';

// EnabledPlugins
$Configuration['EnabledPlugins']['GettingStarted'] = 'GettingStarted';
$Configuration['EnabledPlugins']['HtmLawed'] = 'HtmLawed';

// Garden
$Configuration['Garden']['Title'] = 'omniboard';
$Configuration['Garden']['Cookie']['Salt'] = '***';
$Configuration['Garden']['Cookie']['Domain'] = '';
$Configuration['Garden']['Registration']['ConfirmEmail'] = TRUE;
$Configuration['Garden']['Email']['SupportName'] = 'omniboard';
$Configuration['Garden']['Version'] = '';
$Configuration['Garden']['RewriteUrls'] = TRUE;
$Configuration['Garden']['CanProcessImages'] = TRUE;
$Configuration['Garden']['SystemUserID'] = '2';
$Configuration['Garden']['Installed'] = TRUE;
$Configuration['Garden']['InstallationID'] = '***';
$Configuration['Garden']['InstallationSecret'] = '***';
$Configuration['Garden']['Theme'] = 'vanilla-bootstrap-master';
$Configuration['Garden']['ThemeOptions']['Name'] = 'Bootstrap';
$Configuration['Garden']['ThemeOptions']['Styles']['Key'] = 'Default';
$Configuration['Garden']['ThemeOptions']['Styles']['Value'] = '%s_default';

// Plugins
$Configuration['Plugins']['GettingStarted']['Dashboard'] = '1';

// Routes
$Configuration['Routes']['DefaultController'] = 'discussions';

// Vanilla
$Configuration['Vanilla']['Version'] = '';

// Last edited by zayadur (***)2014-03-01 04:26:50

NOTE: I changed RewriteUrls to TRUE and hid information using 3 asterisks (***). I also removed <(questionmark)php if (!defined('APPLICATION')) exit()(semicolon) from the 1st line.

Now, when I try to force my site to load[route] (i.e. , I get an Internal Server Error. Additionally, I have tried the exact same installation steps and am running everything the exact same way on another server on another host for the website: . There are absolutely no problems there, but it's just happening with , hosted at GoDaddy with a basic web plan.

My PHP version is 5.4 at the moment (upgraded it from 5.3 last night to try and see if things start magically working again).

Any form of advice and support would be greatly appreciated!



  • <(questionmark)php if (!defined('APPLICATION')) exit()(semicolon) from the 1st line.

    You must keep this line for real.

    There is no reason to change .htaccess

    n make thing worse. Changes should be soundly reasoned, not just a wing and a prayer.

    if $Configuration['Garden']['RewriteUrls'] = TRUE; is not working (it should be instant), then there is some other reason such as caching (possibly apc.stat), so that the new config is not being read.

    server rules route the uls, they do not change the links only RewriteUrls config does that. These are two different jobs that make up the nice urls.

    grep is your friend.

  • Please remove this topic, I didn't know it got posted, it was returning database errors when I tried submitting it.


  • the answer is in this post through.

    grep is your friend.

  • I kept that line, I edited it for this topic so it would show up.

    How do I fix the cacheing issue?

    The changes I've tried were based on previous threads on the same topic.

  • first you can find out if the file is being cached. Simply put an exit; in the file if framework still runs then it is cached.

    grep is your friend.

  • Okay, I put


    at the end of the document. It doesn't seem to be running any longer, none of the pages are loading.

    I also noticed the ending tags


    are missing.

  • x00x00 MVP
    edited March 2014

    @zayadur said:
    Okay, I put


    at the end of the document. It doesn't seem to be running any longer, none of the pages are loading.

    ok you can remove it isn't cached by apc

    I also noticed the ending tags


    are missing.

    This is correct you should leave these always unless you are outputting static content

    failure to do so can result in whitespace errors.

    Sorry when I posted the original reply I went on a bit a rant, then though better of it, and deleted it. But needless to say that ask as many questions as you like, don't try a "shotgun" approach to debugging. 9/10 it is better to work through these things logically, don't make assumptions.

    Btw you are using an ALPA version of vanilla expect problems. Most people should be using a the stable version, and if not the BETA.

    alpha is not for production period/full stop.

    grep is your friend.

  • Thank you for the reply.

    I did expect problems, but the fact that everything is working fine on is bothering me.

    Is there a way I can access vanilla 2.2.8 through GitHub? I have an idea.

  • yes by a lot of people running the apha aren't running it themselves, the vanilla team are running it for them on the hosted platform.

    grep is your friend.

  • I own and run , on a different host.

  • It sound more likely it is your setup.

    try clearing .ini files in cache

    Make a file in conf called bootstrap.after.php and put

    <?php if (!defined('APPLICATION')) exit();

    you need to be the original admin who installed it. Login to see the debug output.

    grep is your friend.

  • OK, this is what I see...

  • Ah interesting. So for whatever reason the changes are not persisting, it is like the script is object cached.

    have you previously used memory caching?

    grep is your friend.

  • try disabling OPCache

    grep is your friend.

  • I haven't previously used memory caching.

    How do I go about disabling OPCache?

  • chanhchanh - CMS Researcher ✭✭

    Just curious, what is your phpinfo() look like, does it has mod_rewriterule enable?

  • This is my phpinfo page:

  • Try turning off apc in /web/conf/php5.ini there is a line apc.enabled=1 to apc.enabled=0 or it might say On

    @chanh said:

    Just curious, what is your phpinfo() look like, does it has mod_rewriterule enable?

    you are confusing php with apache config. besides the rewrite rules do no physically change the link they route them

    grep is your friend.

  • In any even it is looking more like this is an aphla bug related to your setup.

    grep is your friend.

  • chanhchanh - CMS Researcher ✭✭

    If the rewrite rule module of Apache is enable then it should show in the phpinfo that is my purpose of asking for it to confirm that the rewrite module is activated. Not all server have that module enable by default.

    @x00 said:
    Try turning off apc in /web/conf/php5.ini there is a line apc.enabled=1 to apc.enabled=0 or it might say On

    chanh said:

Sign In or Register to comment.