how to remove php extention from url through htaccess for example my url is "example.com/about.php" and i want display url this type : "example.com/about" with the help of htaccess file plz help me..............
No problem. But be aware! This would change all images, css & js ! to prevent, replcae that with RewriteEngine on RewriteRule images\/(.*) images/$1 [L] RewriteRule css\/(.*) css/$1 [L] RewriteRules js\/(.*) js/$1 [L] RewriteRule (.*) $1.php [L] I hope you know you have to place css to folder /css, js to folder /js and so on
So i would just need to put the code below to change the PHP pages only: RewriteEngine on RewriteRule (.*) $1.php HTML: Thanks, Michael
Would'nt something like this work better? RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}\.php -f RewriteRule ^(.+?)$ $1.php Code (markup):