1
votes

I've build an application using CodeIgniter with several controllers

I want the application URL to look "pretty" by using .htaccess files.
All controllers seem to work just fine except for the controller that is set as default in the "application/config/routes.php" file

My .htaccess file looks like this:

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

I have also set the config.php file like this

$config['index_page'] = '';

In the server logs I'm getting errors like this:

[Fri Nov 29 10:32:11 2013] [error] [client ...] mod_security: Filtering against POST payload requested but payload is not available [hostname "app.*.nl"] [uri "/user/profile"]

On the development server everything worked just fine, but ever since the app is on the production server it doesn't work with the .htaccess files.

1

1 Answers

0
votes
AddDefaultCharset UTF-8

RewriteEngine On

RewriteBase /

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

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

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