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

1 Answer 1

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.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.