How to redirect user when it tries to access a folder whose page does not contain the index?
Ex:
www.eu.com/ <-- index OK
www.eu.com/arquivos/ <-- index Of redireciona para página inicial
How to redirect user when it tries to access a folder whose page does not contain the index?
Ex:
www.eu.com/ <-- index OK
www.eu.com/arquivos/ <-- index Of redireciona para página inicial
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME}/index\.php !-f
RewriteCond %{REQUEST_FILENAME}/index\.html !-f
RewriteRule (.*) http://%{HTTP_HOST}%/ [L,R=301]