Having issues removing index.php? from the URL:
http://localhost/index.php?/reset_password
With htaccess file:
# Customized error messages.
ErrorDocument 404 /index.php
# Set the default handler.
DirectoryIndex index.php
# Various rewrite rules.
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L,QSA]
</IfModule>
CI Settings:
$config['uri_protocol'] = 'AUTO';
I looked at the other threads on here with similar problems but none of their htaccess files work. Am I missing a setting?
I’ve never seen that
.htaccesssetup before, although it may work. I’ve used this for every CI project I’ve done, give it a try:Add don’t forget this in
config.php:And remember: This will not “remove”
index.phpfrom your URL automatically, but rather route the request through it if it isn’t present. If you have hardcoded links withindex.phpin them, they’ll have to be changed or you’ll need additional.htaccessconfiguration. If you are using the CI url functions likebase_url(),site_url(), andanchor(), they won’t useindex.phpif you have it blank in your config above.