Remove php file extension, less than one folder

0

I have the .htaccess file and want to get the file extensions less than the following: index.php and the system / func / folder which is where my renderings are

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*)$ $1.php
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /(.*)\.php
RewriteRule ^ /%1 [L,R=301]
    
asked by anonymous 27.01.2017 / 14:47

1 answer

1

Place a new .htaccess file in the folder you want to ignore, with:

 RewriteEngine Off

And another one at root with

RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s/(.+)\.php[^\s]* [NC]
RewriteCond %{REQUEST_FILENAME} !index\.php
RewriteRule ^ /%1 [R=301,NE,L]
    
27.01.2017 / 15:18