No Input File Specified -- Strange fix!!
Permalink 2 users found helpfulHad this problem with my host (heart internet) when I first started using C5 -- kept getting that annoying 'no input file specified' error when trying to use mod_reqrite. Played with it, trial & error, a found that this worked (might work for some of you too:
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .$ index.php/$1
</IfModule>
Heart just upgraded to PHP 5.2.10 and this has just stopped working -- URLs in the browser change as they're supposed to when links are clicked, but the homepage would just get re-loaded again and again. Very annoying.
After hours of fiddling trying to come up with another solution, completely by accident I discovered that if you pass the full URI through another php document in your host root, it works!! Code below is now working for me (redirect.php is a completely blank .php file I created for the time being).
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .$ /redirect.php/$1
</IfModule>
Anyone have ANY idea why this might work??! Would love to know if it's a long-term solution...and just HOW IT WORKS!? Haha.
My complete fluke one works without my having to edit request.php or anything, which has that going for it, but I can't for the life of me figure out why specifying any random .php file (don't know, but quite possible a .html file or any other would work too) does the job. I might try both through FireBug or something and see which responds faster -- either way is a bit hack-y, but if we can't have neat and sensible i'll take fast!
I'll let you know the results.
I did bring it up with Heart as my previous solution worked fine up until they updated from PHP 5.2.9 to 5.2.10 at 10:00 today (30th). No idea what changed, and they weren't about to be helpful about it. They also turn off short_tags in PHP, but that's a simple fix (threw me for a bit though...was just more agitated when I couldn't navigate the actual site!!).
As you say, i'd rather not edit the the core like that, makes it a rather long list of things to do before / install or upgrade.
Incidentally what is the short_tags you refer to Heart turning off? (i'm not very php savvy so don't know what different things on the server do)
What effect will this have and, should I need, what is the fix?
Many thanks
Not sure how the solution works though but thankfully it does, have you come across any problems.
Thanks.
Short tags for example look like this <? ?> <- short tags, instead of <?php ?> <- normal tags.
viva la redirect.php
I had this problem today, and this did not solve the problem, though just adding a question mark after index.php did it! =)
So its like
<IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php?/$1 [L] </IfModule>
The MAGIC question mark worked for me too!
I am working on my first 5.5.1 website (previously used 5.4) and keep finding fixes needed to make things work.
Thanks for that simphax
Best wishes
Vern
Thinking about it, the urls that look like "... index.php/page_name/" ARE queries. Right? So without switching on Pretty URLs, I tried both "... index.php?/page_name/" and "... index.php?page_name/" Guess what, they both worked.
I activated Pretty URLs, then edited the htaccess file and replaced the slash after index.php with a question mark and FINALLY I have now pretty URLs.
FYI, I'm running Concrete5 version 5.4.2.1.
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .$ /redirect.php/$1
</IfModule>
Using the correct concrete5 pretty urls code now works, problem is i'll now have to go through all the sites changing the htaccess!
Seems Heart have changed something across their infrastructure and basically broken a ton of C5 sites that I have there.
No notifications, no status update - just serverwide config changes with not a care in the world... just like crazy internet cowboys.
<IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php/$1 [L] </IfModule>
I recently upgraded for new version on C5 and permissions got really messed up.
It also deactivated the following Add Ons:
'Advanced Guestbook Comment' is not working, 'Simple Blog Post' is not working, 'Popup Menu' is not working.
Please see attachment.
Thank you in advance!!
However, if those are market place blocks you're better of contacting the sellers.
See my post at the bottom of this thread:
http://www.concrete5.org/community/forums/customizing_c5/pretty_url...
I'd love to hear from someone about which one is the more kosher fix / workaround