htaccess remove index.php from url

by Yogesh Khanna 27-May-16

0 6926

To remove or hide index.php from URL link, you have to put the following code in your .htaccess file. After putting this code in your file it will simply hide the index.php from Website's URL.

RewriteEngine On
RewriteBase /

# Removes index.php
RewriteCond %{THE_REQUEST} ^.*/index.php
RewriteRule ^(.*)index.php$$1 [R=301,L]
RewriteRule ^(.*)index$$1 [R=301,L]



    Waiting for your comments

Leave a Reply