Mobile app version of vmapp.org
Login or Join
Kimberly868

: .htaccess remove index.php/url/ from URL .htaccess is not working. /index.php/user -- is working http://www.example.com/user is not working Current .htaccess file: RewriteEngine on RewriteCond %{REQUEST_FILENAME}

@Kimberly868

Posted in: #Codeigniter #Htaccess #ModRewrite #Php

.htaccess is not working.


/index.php/user -- is working www.example.com/user is not working


Current .htaccess file:

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php/[CO] [PT,L]

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Kimberly868

2 Comments

Sorted by latest first Latest Oldest Best

 

@Margaret670

check httpd.conf to see if .htaccess is enabled

10% popularity Vote Up Vote Down


 

@XinRu657

Your rewrite rules should look like this:

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


If your CI installation runs on a CGI implementation, you should add a questionmark in the .htaccess, lik so:

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

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme