.htaccess redirect when indexOf

0

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
    
asked by anonymous 05.08.2015 / 18:25

1 answer

0

I solved this!

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]
    
05.08.2015 / 19:42