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: www.omniboard.co
I recently uploaded Vanilla Garden 2.2.3.4. From the install menu, I noticed the URL path as being omniboard.co/index.php/?p=dashboard/setup . 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: omniboard.co/?p=[route], where instead, they should be omniboard.co/[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...
.htaccess
# 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]
config.php
// Conversations $Configuration['Conversations']['Version'] = '2.2.3.4'; // 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'] = '2.2.3.4'; $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'] = '2.2.3.4'; // 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 omniboard.co/[route] (i.e. omniboard.co/discussions) , 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: www.paramountgaming.net . There are absolutely no problems there, but it's just happening with omniboard.co , 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!
Comments
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.
/flagged.
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.
ok you can remove it isn't cached by apc
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 paramountgaming.net 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 paramountgaming.net , 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
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?
Just curious, what is your phpinfo() look like, does it has mod_rewriterule enable?
This is my phpinfo page: http://omniboard.co/phpinfo.php
Try turning off apc in
/web/conf/php5.ini
there is a lineapc.enabled=1
toapc.enabled=0
or it might sayOn
@chanh said:
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.
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.