- Remove the index.php in the CI config file
$config['index_page'] = ""; - Add .htacess file in the root of your application
RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L,QSA] - Uncomment the mod_rewrite in httpd.conf
LoadModule rewrite_module modules/mod_rewrite.so - Change None to All
</Directory>
<Directory />
Options FollowSymLinks
AllowOverride All
Order deny,allow
Deny from all - As well as the web root folder (this is needed)
<Directory "C:Apache/htdocs">Options Indexes FollowSymLinks </Directory>
AllowOverride All
Order allow,deny
Allow from all
Sunday, May 3, 2009
CodeIgniter - Removing index.php by Changing .htaccess and httpd.conf
I've done this many, many times. But whenever I setup a new site on a new developer machine, I will have to do research over and over again. I decided to write down the details, actually only a few steps.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment