CodeIgniter Forums

Full Version: help with htaccess
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

[eluser]sixpack434[/eluser]
Everything was working fine until yesterday our hosting providers decided to upgrade to apache 2 which comes with Mod_FCGI over normal CGI. As a result, the htaccess isn't working anymore, so I'll need to include the index.php in the urls for the pages to work.

The guy from the hosting provider said

Quote:Hello, We have upgraded to Apache 2 which comes with Mod_FCGI over normal CGI. This was done as part of the normal security upgrades. You will need to talk with your developers about correcting the .htaccess file. We are unable to give you support for this.

We could try your account on a SuPHP server over a FCGI server if you wish BUT this might not help. I would suggest correcting the .htaccess file. I did find this help file on google: http://www.askapache.com/htaccess/ultima...ample.html Regards,

My htaccess code was the below but is not working anymore
Code:
<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>

<IfModule !mod_rewrite.c>
    # If we don't have mod_rewrite installed, all 404's
    # can be sent to index.php, and everything works as normal.
    # Submitted by: ElliotHaughin

    ErrorDocument 404 /index.php
</IfModule>

I tried changing to the following but it didn't help
Code:
<IfModule mod_rewrite.c>
    RewriteEngine On
Options +FollowSymLinks +ExecCGI +Includes
AddHandler fcgid-script .fcgi
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php/$1 [L]
    RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]
</IfModule>

<IfModule !mod_rewrite.c>
    # If we don't have mod_rewrite installed, all 404's
    # can be sent to index.php, and everything works as normal.
    # Submitted by: ElliotHaughin

    ErrorDocument 404 /index.php
</IfModule>
any ideas on how I could get this working??

Thanks in advance

El Forum

[eluser]Hugh Fletcher[/eluser]
You might take a look at this post in the ExpressionEngine forums.


http://ellislab.com/forums/viewthread/68083/

Same problem with an Apache 2 upgrade. Problem fixed with a question mark like so...

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

Hope this helps.

El Forum

[eluser]sixpack434[/eluser]
I would never have guessed it's just a question mark. I spent many hours trying all sort of things, but this actually did the trick. Thank you very much Hugh. You're a star