Knowledgebase


Portal Home > Knowledgebase > Hosting FAQ's > How to remove the .php extension from the URL?

How to remove the .php extension from the URL?

Ans : Add the following code in .htaccess file

Options +FollowSymLinks
Options +Indexes
RewriteEngine on
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteRule ^([^.]+)$ $1.php [NC,L]


Also Read