Malfunctioning of the site after change in .htaccess

0

For a site that has a friendlier url I've removed the .php using the following commands within .htaccess :

RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-f

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

It worked perfectly for the news.php part, and the www.example.com website opens without the need to add index.php. However, the problem is in the administrative panel, which makes it necessary to add index. Staying obligatorily in this form:

www.exemplo.com.br/painel/index

or

www.exemplo.com.br/painel/index.php

How can I fix this? Only access with / panel /

Thank you!

    
asked by anonymous 04.05.2016 / 20:17

1 answer

0

Just missing RewriteBase / leave your code like this:

RewriteEngine On
RewriteBase /

RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.php [NC,L]
    
04.05.2016 / 21:24