How to remove index.php in codeigniter

Please log in or register to like posts.

                        How to remove index.php in CodeIgniter

Open the file config.php
// Find the below code $config[‘index_page’] = “index.php”// Remove index.php $config[‘index_page’] = “”

CodeIgniter folder and create .htaccess

Your_website_folder/ application/ assets/ system/ user_guide/ .htaccess <——— this file index.php license.txt


Code of .htaccess file

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


config.php File

// Find the below code $config[‘uri_protocol’] = “AUTO”// Replace it as $config[‘uri_protocol’] = “REQUEST_URI”

Reactions

0
0
0
0
0
0
Already reacted for this post.

Reactions

Leave a Reply

Your email address will not be published. Required fields are marked *