I had previously posted a guide on how to get pretty URL's working in conjunction with DreamHost's shared hosting and Concrete5 CMS. Recently we were attempting to get fastcgi running at Monsoon and were confronted with the dreaded "No input file specified" that I was used to seeing on Dreamhost. I tried applying the same solution but to no avail.
After much poking about, I've finally arrived at a solution that seems to work on both Dreamhost and over here at Monsoon.
First, set everything up as you normal would. Get your Concrete5 installation running and turn on pretty url's only to find they don't quite work.
Now the changes...
In your root site directory, create a file named pretty_url.php and fill it with the following contents:
require('index.php');
Next, edit the .htaccess file you originally created and change one line.
RewriteRule ^(.*)$ index.php/$1 [L]
becomes
RewriteRule ^.*$ pretty_url.php/$1 [L]
That's all there is to it! Save your changes and enjoy your pretty URL's. It seems that the regular expression used in the RewriteRule causes php-cgi to fail. If we just modify that regular expression to stop capturing, it works well. I'm not sure why pretty_url.php was needed, but the solution doesn't 100% function without it. I settled on the pretty_url.php method after reading this post.
Enjoy!
Please add a comment
Thanks heaps, I simplified it down to removing the ( and ) from this line
RewriteRule ^(.*)$ index.php/$1 [L]
I did post this on the C5 forum crediting you...but don't know if I popped it on the correct forum page.
cheers
Thanks for your efforts
/folder1/folder2
I tried putting the .htaccess and pretty_url.php files in the root directory outside of /folder1, as well as /folder1, and /folder1/folder2. Am I missing something?
Thanks so much for posting this!
Leave a Reply