URL rewriting problem ('no input file specified')

Permalink
Hi all

I'm getting the error 'no input file specified' when I try to access a rewritten URL when prettified URLs are turned on.

The site is currently on a temp URL, before I move the domain to it. The c5-generated .htaccess file contains this:

# -- concrete5 urls start --
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /~scotlawc/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>
# -- concrete5 urls end --


You can see phpinfo() athttp://r33769.ovh.net/~scotlawc/info.php...

I've seen some other posts on the forum about this problem but I've not managed to fix it using those.

Any help would be much appreciated :)

melat0nin
 
jjdb210 replied on at Permalink Reply
jjdb210
Mod Rewrite debugging... this might be another interesting little side affect of using php-cgi and suPHP... but lets try this first:

<IfModule mod_rewrite.c> 
RewriteEngine On 
RewriteBase /~scotlawc/ 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule ^(.*)$ /~scotlawc/index.php/$1 [L] 
</IfModule>


If that doesn't work, try it without the scotlawc:

<IfModule mod_rewrite.c> 
RewriteEngine On 
RewriteBase /~scotlawc/ 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule ^(.*)$ /index.php/$1 [L] 
</IfModule>


We'll get it eventually :-)
melat0nin replied on at Permalink Reply
melat0nin
Well I've decided to scrap that server and start again from scratch.

I've installed Ubuntu server 9.04 and am going to build the thing from the ground up, so there should be no weird Apache configurations or anything like that.

In fact, I'm planning to use Lighttpd. What do you think?
jakob replied on at Permalink Reply
hi,

I wouldn't recommend using lighttpd. It lacks many of the features apache provides, you don't have as much documentation and support out there, yet what you may gain in speed is insignificant to most sites!

Use apache with php5 as a module. Don't use mod_security for now.

The problem with your rewrites is that apache thinks "index.php/foo/bar" is supposed to be a file, but of course it isn't :)
I'd suggest trying either

RewriteRule ^(.+)$ index.php?/$1

or

RewriteRule ^(.+)$ index.php/$1 [R]

Note the question mark in rule 1 and the new R flag in rule 2.

Hope this helps!

Jakob
melat0nin replied on at Permalink Reply
melat0nin
Thanks for the suggestion. What features do you think Lighty lacks which are necessary for a c5 site? Speed and stability are my main concern (provided all necessary features are available). Perhaps I could start with Apache and see how that goes first, because you're right, there is a lot of documentation out there on setting up a LAMP stack.
nteaviation replied on at Permalink Reply
nteaviation
I agree with jperz to go with apache. It has a much wider user base and is the "industry standard". Also, if I am building a server, I do not load any of the desktop stuff. It is a server not a work-station (so get used SSH and the command line). I start with the bare minimum and add only what is required. There are alot of how-to out there to do just that. I also recommend CentOS. It is extermely stable, secure, runs on almost anything and has long product support cycle. if you want a little more "bleading edge", I go with Fedora... But that is just me :)
melat0nin replied on at Permalink Reply
melat0nin
Thanks

I think you're right, I'm going to go with Apache. I'll be running Ubuntu tho cos that's where my experience lies :)
nteaviation replied on at Permalink Reply
nteaviation
Good call. "Go with what ya know"! Can you tell i'm a "Red Hat Man" :)