Redirecting htaccess if extension and folder do not match

-1

I want to have it redirect to my domain if it is not a .php file or certain folders. The php I got:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule \.(php)$ - [L]
RewriteRule (.*) https://www.exemplo.com/$1 [R=301,L]
    
asked by anonymous 21.11.2018 / 20:39

1 answer

-1

Done,

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule \.(php)$ - [L]
RewriteRule ^(pasta1|pasta2)($|/) - [L]
RewriteRule (.*) https://www.exemplo.com/$1 [R=301,L]
    
21.11.2018 / 20:43