remove .php extension from url in php

Just follow these steps

Open .htacess file and copy below code in .htacess file

 
RewriteEngine On

RewriteRule ^test?$ test.php

Here test is your page name
Now you can visit your page like abc.com/test

remove ?id from url in php

if your url is user.php?id=1
then just copy the below code in your htacess file
RewriteEngine On

RewriteRule ^user/([0-9]+) user.php?id=$1



RewriteRule ^test?$ test.php

RewriteRule ^user/([0-9]+) user.php?id=$1


RewriteRule ^shop/cat/([0-9a-zA-Z]+)/subcat/([0-9a-zA-Z]+) shop.php?cat=$1&subcat=$2




  That’s It. Now you see a magic in your url how to remove .php extension from url in php    
Secured By miniOrange