-8

I have tried lots to remove the .php from URL using htaccess. I tried many script but not get the proper result.

RewriteRule ^(([^/]+/)*[^.]+)$ /$1.php [L]

I tried above code to remove .php but not working for me.

Ravi Shrimali
  • 111
  • 1
  • 9

1 Answers1

-1

Try:

RewriteCond %{REQUEST_FILENAME} !-d

RewriteCond %{REQUEST_FILENAME} !-f

RewriteRule ^(.+)$ $1.php [L]

shushu304
  • 1,506
  • 1
  • 7
  • 15