CodeIgniter Forums
No input file specified and htaccess - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21)
+--- Thread: No input file specified and htaccess (/showthread.php?tid=3123)



No input file specified and htaccess - El Forum - 09-11-2007

[eluser]Lobosaurus[/eluser]
Hi,

I am getting "No input file specified" error message at my Godaddy hosting (caused by PHP as CGI).

I tried hack with
Code:
$config['index_page'] = "index.php?";
and url´s like /index.php?welcome are now OK. Unfortunately I am not able to use it with friendly url´s in .htaccess file. I tried about ten variations and nothing was working. My current .htaccess file looks like:
Code:
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php?$1 [L]

Has anybody working htaccess file at godaddy?


No input file specified and htaccess - El Forum - 09-11-2007

[eluser]ELRafael[/eluser]
contact godaddy? sometimes, the server blocks this thing....

my .htacess

Code:
RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt|public)
RewriteRule ^(.*)$ index.php/$1 [L]



No input file specified and htaccess - El Forum - 09-11-2007

[eluser]Lobosaurus[/eluser]
I think it won´t work because I need to rewrite url index.php?blablabla and no index.php/blablabla


No input file specified and htaccess - El Forum - 09-11-2007

[eluser]ELRafael[/eluser]
[quote author="Lobosaurus" date="1189549160"]I think it won´t work because I need to rewrite url index.php?blablabla and no index.php/blablabla[/quote]

Code:
RewriteRule ^(.*)$ index.php?$1 [L]

still no working?
maybe you don't have permissons to use .htaccess!!! i think that is the problem


No input file specified and htaccess - El Forum - 09-11-2007

[eluser]Lobosaurus[/eluser]
I am SO STUPID. I used Notepad in Windows Vista for quick editing htaccess and it didn´t rewrite previous file.

RewriteRule ^(.*)$ index.php?$1 [L] is working


No input file specified and htaccess - El Forum - 09-11-2007

[eluser]ELRafael[/eluser]
[quote author="Lobosaurus" date="1189553683"]I am SO STUPID. I used Notepad in Windows Vista for quick editing htaccess and it didn´t rewrite previous file.

RewriteRule ^(.*)$ index.php?$1 [L] is working[/quote]

So the problem was between the chair and monitor? :cheese:

Hey, try to use GVIM for quick editing files, fast as a punk rock song and easy as a cool beer

http://www.vim.org/download.php#pc


No input file specified and htaccess - El Forum - 09-18-2007

[eluser]Rich Hauck[/eluser]
I've got a similar problem (Hosting on a FreeBSD server, not GoDaddy) and unfortunately the final solution posted didn't work for me.
If I use the following config.php settings:

$config['index_page'] = "index.php?";
$config['uri_protocol'] = "QUERY_STRING";

I can get pages using site.com/index.php?pagename

Naturally, I want clean URLs, but if I post an htaccess file using this:

RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?$1 [L]

This is what I get:
site.com/pagename -- redirects me to the default view.
site.com/index.php -- 404 error
site.com/index.php/pagename -- “No input file specified”
site.com/index.php?pagename -- 404 error

Any ideas?


No input file specified and htaccess - El Forum - 09-18-2007

[eluser]ELRafael[/eluser]
[quote author="Rich Hauck" date="1190152638"]I've got a similar problem (Hosting on a FreeBSD server, not GoDaddy) and unfortunately the final solution posted didn't work for me.
If I use the following config.php settings:

$config['index_page'] = "index.php?";
$config['uri_protocol'] = "QUERY_STRING";

I can get pages using site.com/index.php?pagename

Naturally, I want clean URLs, but if I post an htaccess file using this:

RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?$1 [L]

This is what I get:
site.com/pagename -- redirects me to the default view.
site.com/index.php -- 404 error
site.com/index.php/pagename -- “No input file specified”
site.com/index.php?pagename -- 404 error

Any ideas?[/quote]

Try to remove
Code:
RewriteBase  /



No input file specified and htaccess - El Forum - 09-18-2007

[eluser]Rich Hauck[/eluser]
No dice. Doing that and trying site.com/pagename returns a 404.


No input file specified and htaccess - El Forum - 09-18-2007

[eluser]ELRafael[/eluser]
[quote author="Rich Hauck" date="1190165499"]No dice. Doing that and trying site.com/pagename returns a 404.[/quote]

this 404 error, is codeigniter or is apache?