0

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?

2

4 Answers 4

3

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";
Sign up to request clarification or add additional context in comments.

Comments

0

You can remove using:

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

Comments

0

Read the docs fully and clearly. codeigniter urls docs

Comments

0
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]

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.