htaccess remove index.php from url

This is the basic rule to hide index.php from the URL. Put this in your root .htaccess file.

For example :-
Your site url http://example.com/index.php now we want my site always open with this url redirect http://example.com

#Remove index.php from url 
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /(.*)index\.php5($|\ |\?)
RewriteRule ^ /%1 [R=301,L]

Leave a Reply