Hello,
I'm trying to redirect all subdirectories to the root of my website via .htaccess! The code below works fine if I try to access a subdirectory ... but doesn't let me display the index page in the root because starts a loop of redirects!
RedirectMatch temp ^/.*$ http://localhost/
How can I solve?
Thanks!
EDIT1: Or is there a way to deny the access to all the subdirectories via .htaccess?
SOLUTION: The solution to the question (thanks to TomG) is:
RedirectMatch temp ^/.+/.*$ http://localhost/