-1

I am unable to remove index.php from CodeIgnitor 3.0 URL. I have applied so many solutions but nothing worked. I am using WAMP 2.5 . rewrite_module is active in Apache . $config['index_page'] = ''. My htaccess file which is in the root folder is as follows

RewriteEngine on 
RewriteBase /Reporting/ 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteCond $1 !^(index\.php|js|img|css|captcha|robots\.txt) 
RewriteRule ^(.*)$ /yourfolder/index.php/$1 [L]

Reporting is the folder in www where all the files are there.

Cœur
  • 37,241
  • 25
  • 195
  • 267
Vivek
  • 3
  • 3
  • 1
    Possible duplicate of [CodeIgniter removing index.php from url](http://stackoverflow.com/questions/19183311/codeigniter-removing-index-php-from-url) – RiggsFolly Sep 05 '16 at 14:30

2 Answers2

0

Try with this code in .htaccess

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

You have this in Codeigniter documentation - READ

vip88
  • 3
  • 2
0

I had problems with removing index.php with the default .htaccess code, but I managed and this is how my .htaccess looks like now.

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


<Files "index.php">
AcceptPathInfo On
</Files>  
</IfModule>

<IfModule !mod_rewrite.c>

ErrorDocument 404 /index.php
</IfModule>
StudentX
  • 2,243
  • 6
  • 35
  • 67