0

Before posting here I've tried solutions URL1, URL2 but not fixed yet. My .htaccess code like this:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.php [NC,L]

In my application $_GET and $_POST used and file structure in htdocs like this:

shopping ->(main folder) css(folder) images(folder) js(folder) .htaccess file1.php file2.php : : file9.php

So how I can get rid from removing .php in URL

Community
  • 1
  • 1
Vilas
  • 837
  • 2
  • 15
  • 41

1 Answers1

0
  1. Check that .htaccess is applied in the first place — see here;

  2. Make sure that your configuration allows overriding at least FileInfo in .htaccess files (you may also do AllowOverride All):

    <Directory "/var/www/html">
        AllowOverride FileInfo
    </Directory>
    

    See this question for details.

Community
  • 1
  • 1
Alex Shesterov
  • 26,085
  • 12
  • 82
  • 103