jereme claussen

Concrete5, Pretty URL's and DreamHost v2.0

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

Posted by Dave Myers on
Thanks! Your .htaccess work-around appears to work on DreamHost Private Servers.
Posted by Josh on
This worked. Thank you.
Posted by Ian on
Hey dude

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
Posted by Ian on
Oops, no it doesn't work. My mistake, I deleted the post I put on the C5 forum. Your exact way is working peachy fine right now.

Thanks for your efforts
Posted by S. on
Thanks for this post! I'm having a hard time getting it to work, but it could be because I've got C5 installed in a subdirectory, and I'm putting the files in the wrong folder. My folder structure is:

/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?
Posted by Jordan Lev on
This worked perfectly -- thank you so much for sharing this!
Posted by Ebtoulson on
Thanks man, worked perfectly
Posted by jereme on
@S, Did you set the RewriteBase to your subdirectories?
Posted by Ped on
Life saver, thank you so much for this dreamhost fix !!
Posted by Kirk on
I used this on in conjunction with Bluehost's FastCGI with great success!
Thanks so much for posting this!
Posted by Ricky on
Same issue at GoDaddy - This took care of it! Thanks for the help!!!
Leave a Reply



(Your email will not be publicly displayed.)

Please type the letters and numbers shown in the image.Captcha CodeClick the image to see another captcha.