Welcome Guest, Not a member yet? Register   Sign In
.htaccess woes

I can't seem to get this to work. I searched and searched the forums, tried all the replies, and nothing worked.

I have my CI installed at www.mysite.com/ci/.

On my server, PHP is running in CGI mode, so I have edited php.ini files in every subdirectory with cgi.fix_pathinfo=0 (as per another thread). Do I need this, and if so, do I need a php.ini in every folder or just mysite.com/ci/?

My .htaccess is this:
RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule ^(.*)$ /ci/index.php/$1 [L]

config['index_page'] = "";

At this point for some reason when I go to ANY page in mysite.com/ci, I get "No input file specified". Even when using index.php to route to my controller!

I removed cgi.fix_pathinfo=0 and set it back to 1 and I no longer get the error if I use index.php. I still get it if I try to do it without index.php.

hi ryeguy,

I'm no htaccess expert, but in my projects running in
a subfolder, I edit my confic.php this way:
$config['base_url'] = "http://www.myproject.com/subfolder/";

and don't write the subfolder into htaccess:
RewriteRule ^(.*)$ /index.php/$1 [L]

instead of:
RewriteRule ^(.*)$ /subfolder/index.php/$1 [L]

I don't know if that work for you ..
on some webservers url rewriting only works with following htaccess:
<IfModule mod_rewrite.c>
    # Turn on the Rewrite Engine
    RewriteEngine On
    # If the file or directory exists, show it
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^(.+) - [PT,L]
    # Blank queries get sent to the index
    RewriteRule ^$ index.php [L]
    # All other queries get sent to the index as index.php/whatever
    RewriteRule ^(.*)$ index.php/$1 [L]

Thank you so much! That worked perfectly!

Theme © iAndrew 2016 - Forum software by © MyBB