I'm unable to remove file extension from my URL
https://www.deemsolar.com/ar/index.php
This is the current URL of my website
I want to change this as https://www.deemsolar.com/ar/
Please Help me out?
I'm unable to remove file extension from my URL
https://www.deemsolar.com/ar/index.php
This is the current URL of my website
I want to change this as https://www.deemsolar.com/ar/
Please Help me out?
Add this in your .htaccess
file
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L,QSA]
Note: make sure that in config.php
file,
$config['index_page'] = "";
$config['uri_protocol'] = "REQUEST_URI";
You can remove using:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.php [NC,L]
# For Index
RewriteRule ^index.extension?$ /index.php [NC,L]
# For Another Page
RewriteRule ^login.extension?$ /login.php [NC,L]