-1

why not working to remove index.php using htaccess

Options +MultiViews

RewriteEngine On

RewriteCond %{REQUEST_FILENAME}.php -f

RewriteRule !.*.php$ %{REQUEST_FILENAME}.php [QSA,L]
Boken
  • 4,825
  • 10
  • 32
  • 42
user8274471
  • 27
  • 1
  • 8
  • 2
    Possible duplicate of [Remove .php extension with .htaccess](https://stackoverflow.com/questions/4026021/remove-php-extension-with-htaccess) – B001ᛦ Mar 26 '19 at 10:28
  • Please go read [ask]. Give an example of a URL you want to rewrite, and explain what happens instead of what you expected. – 04FS Mar 26 '19 at 10:32

1 Answers1

0

This will help you:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteCond %{REQUEST_URI} !/$
RewriteRule (.*) $1\.php [L]
Ingus
  • 1,026
  • 12
  • 34
  • This helped me once https://stackoverflow.com/questions/12202387/htaccess-not-working-apache – Ingus Mar 26 '19 at 11:41