htaccess issue

Alright so this is my first time using CodeIgniter. I successfully installed it and i am now reading the general topics section.

I am on the URL section and I am working on removing the index.php file however whenever i create the .htaccess i get an internal server error.

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

any idea what might be causing this?

Thanks in advance :coolhmm:

That's a really cheap HTACCESS solution. Try this instead:

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

<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

Just make sure to change the "RewriteBase" directory to the folder your install is in. If it's a root directory (AKA at, not, just leave a single slash.

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.