Answer the question
In order to leave comments, you need to log in
Why can't I hide the .php extension?
I decided to make it so that when entering pages like localhost/site/info, the info.php page opens. but 404 error appears. I use wamp, here is the code in .htaccess:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*)$ $1.php
Answer the question
In order to leave comments, you need to log in
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*)$ $1.php
Try this
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question