Plesk Mod Rewrite Problem
PermalinkLooking through the forums I have tried adding a php.ini file, and also making the change to the htaccess and the change in site.php however it doesnt seem to be fixing the problem.
Any ideas?
ie the link is still /index.php/page
can you access just /page
(Without Friendly URLs enabled)
<IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php/$1 [L] </IfModule>
Diabling ‘Enable Pretty URLs’ and adding this htaccess to the root of my folder (trialling in a subfolder) the page is still coming up as: index.php/about/
First tick the box to enable the pretty URLs. This seems to create an htaccess file. Then replace the contents of the htaccess file with the following:
<IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule .* /redirect.php/$1 [L] </IfModule>
and you need to add an entirely blank file called 'redirect.php' at the site root.
Kind regards
Dan
I am trialling this concrete5 install in a subfolder. Adding this, to the concrete5 folder doesn’t seem to do anything, adding it to the folder above simply took the site to the index page of the domain.
I understand that you're having problems. I had the same issues before. I'm running off a new host now that specializes in custom php files for C5 - so it's running like a charm.
Here's a few things for you to look at.
First - your .htaccess file.
Clear out whatever is in there and replace it with this.
# -- concrete5 urls start --
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>
# -- concrete5 urls end --
The second thing is that you'll want to edit is your public_html/config/site.php
Use this here.
<?php
define('DB_SERVER', 'localhost');
define('DB_USERNAME', 'your db username');
define('DB_PASSWORD', 'Your db password');
define('DB_DATABASE', 'Your db name');
define('BASE_URL', 'http://iamparanoidsocantgiveittoyou.com');
define('REDIRECT_TO_BASE_URL', true);
define('DIR_REL', '');
define('PASSWORD_SALT', 'Put your SALT KEY here.');
Leave the PHP tag Open.
If you dont have a "Salt Key" - then delete it.
Anyways - that should do the trick.
Make sure you dont touch that "pretty url enable/disable" button in the dashboard after you've done the changes. It should be enabled before you start.
If this saved you time and worked - I do accept Beer Donations. j/k
Van
If adding the ? didnt solve it it is possible that mod re_write is not enable or you are not allowed to run this (most host will allow this) but worth a check.
If you do have safe mode of you can disable it in your domain host settings.
Unfortunately on install all images failed, even though all the the folders (files, Packages, and config) are set to 777 and my browsers cache has been emptied.
When I try and upload any images they fail with an error.
I really need some help with the upload and set up of concrete5 as I keep running into problems. Any ideas?
Also did you setup the files like I said?
I have double checked that my upload directory permissions is 777, cleared cache and tried again. Is this possibly because php safe mode is on?
do that for me and see if there's any difference.
If not - then Drop me a copy of your php.ini
Also the /public_html/files folder needs to have Write access to it.
permissions are 755 Don't make it 777 (make sure you do it Recurssive)
Also make sure that PHP Safe Mode is turned OFF
The other thing you can do which would help.
Make a file in your public_html folder called phpinfo.php
In that folder put in this code
<?php phpinfo() ?>
http://mysite.com/phpinfo.php will now show your php settings which makes it easier to see if anything is out of place.
By turning off phpsafemode, I am now able to upload files, and the mod rewrite seems to be working when I create new pages.
All of this makes little sense as the same set up before, only it was running in a subfolder rather than from the main directory.
Site seems slow at the moment even after clearing the cache, and as the example content is not present from the set up, and neither is the tmp folder. I am thinking of deleting the whole install, clearing the database and trying the install from scratch again to see if this speeds up the page loading.
Also I noticed that there is no php.ini file in this site, could this help with the speed?
Thank you for your help, still unsure on the set up problems, and hope that I can get it running at a reasonable speed.
I use a Dedicated Hosting company as I know C5 uses a lot of juice. The company I'm with has 2 Gigz of ram dedicated just to run scripts in C5. My sites are pretty damned fast - much quicker then when I used to have them on hostgator or godaddy.
If you find your sites are slow - then I would change hosts. You pay a little more, but it's worth it in the end.
What part of the world do you live in?
I am running Wordpress and other sites and not had any problems with speed.
Is there anything that can be done with php.ini or htaccess to speed up the loading, like you would do with wordpress. e.g: memory_limit = 32M.
I just wondered as there isnt a php.ini file present at the moment.
That Memory Limit Cvar is inside of the php.ini
Raise that to 256MB and that will help you a great deal.
The core c5 team are unable to load it into the core as it is not mit licensed so they are working on their own version but the miser script is very good. You just need permission from the author to use it on your site.(If you are running it for commercial use non-commercial I believe is fine)
http://www.concrete5.org/community/forums/customizing_c5/miser-web-...
we use ukfast for our sites, both concrete and bespoke and rarely have a problem with them, and when we do their customer service is very good.
http://www.ukfast.co.uk
are you able to use the htaccess to do any redirecting?