Search This Blog

Wednesday, May 11, 2016

SOLVED , How to Remove index.php with htaccess in Codeigniter (most easiest way)

I've just found the easiest way to remove index.php by using .htaccess file in codeigniter. The solution actually already mentioned  in userguide

1. Make sure the mod_rewrite has enabled in your server (httpd.conf)
2. create .htaccess in root , and copy the script from user_guide (general) as mention bellowed

https://codeigniter.com/user_guide/general/urls.html

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

edit line 4 ...

RewriteRule ^(.*)$ yourSiteRootolder/index.php/$1 [L]

Save the file

That's it...

By...
HERY PURNAMA
Certified IT Trainer


 Call/ SMS/WA :  081.223344.506
 
 Blog :
 
 Social Net :

Hometown : Bandung - Jawa Barat

Please consider your environmental responsibility. Before printing this e-mail message, ask yourself whether you really need a hard copy.




No comments:

Post a Comment