1

I know that this question has been asked maybe thousands of time before, I looked at most of them and could not fix for my case :s

I have a codeigniter framework installed on godaddy hosting company and i read that i have to create a .htacces file and put this code into:

<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [QSA,L]
</IfModule>

But this does not fix for my case, is it that I have this site hosted under another domain? for ex the structure of my ftp looks like below: / facelajm studenti fxclod

and I am trying to get the site following url www.facelajm.com/studenti which opens the main page fine, but when i try to login or reg it just returns me No input file specified.

Anyone could help me?

2
  • Try replacing this line: RewriteRule ^(.*)$ index.php?/$1 [QSA,L] with this one: ewriteRule ^(.*)$ index.php/$1 [QSA,L] Commented Sep 25, 2013 at 18:35
  • This is what I have: RewriteRule ^(.*)$ index.php [QSA,L]. Commented Sep 25, 2013 at 18:42

4 Answers 4

2

Seems that in certain configurations the CI core misses the rules, the .htaccess I'm using now:

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

In my case (dev: a subfolder, prod: an "addon domain") the magic was provided by those two extra lines:

RewriteCond %{REQUEST_URI} ^/system.*
RewriteRule ^(.*)$ index.php?/$1 [L]

Source: http://www.diegodicamillo.com.ar/blog/2012/09/19/no-input-file-specified-codeigniter-error-problema-resuelto/

Sign up to request clarification or add additional context in comments.

Comments

1

From your question what i understand is you are running the codeignitor in a subfolder("studenti") of the domain("www.facelajm.com"). So the below .htaccess code will work.

<IfModule mod_rewrite.c>
Options +FollowSymlinks
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [QSA,L]
</IfModule>

And also don't forgot to change the baseurl in configuration file(application/config/config.php) like below.

$config['base_url'] = "http://www.facelajm.com/studenti"

The above .htaccess which you used in your question will work for a sub domain. So you can also create a sub domain and map the folder to the sub domain and use the code which you used in your question(For Reference i added below).

<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [QSA,L]
</IfModule>

And also don't forgot to change the baseurl in configuration file(application/config/config.php) to the new subdomain(assuming new sub domain as http://codeignitor.facelajm.com/) like below.

$config['base_url'] = "http://codeignitor.facelajm.com/"

Comments

0

Here is the .htaccess file i have on a godaddy and it works fine:

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule ^(.*)$ index.php/$1 [L]

Your problem might be the RewriteBase line if codeigniter is not in the root.

13 Comments

what does your original url look like. mine looks like mysite.com/app/welcome (no index.php - welcome.php is a controller file. app is the root of the codeigniter install)
www.facelajm.com I have put another codeigniter project under this folder, facelajm.com/studenti this is my site
ok. so are you going to facelajm.com/studenti. when i go there an app comes up - i don't know if its the correct app, but its an app.
yes, i am going that way, and it opens the site fine, but when i try to log in it just gets that errot no input file
it goes in the same directory as the application folder - the root of your codeigniter app.
|
0

Please try this code:

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.)$ /index.php [L] or RewriteRule ^(.)$ index.php?/$1 [QSA,L]

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.