I want to restrict user who try to browse the list of page through directory browsing , currently I am able to redirect user to index page if he try to access "xyz.leadangel.com/assets" but I am not able to redirect to index page if he try's to access "xyz.leadangel.com/assets/config.json" , config.json file is success fully get open , I dont want that so please suggest some solution for this
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]
RedirectMatch (.*)/assets/$ https://xyz.leadangel.com/index.html#/
RedirectMatch (.*)/assets/img/$ https://xyz.leadangel.com/index.html#/
RedirectMatch (.*)/assets/icons/$ https://xyz.leadangel.com/index.html#/
RedirectMatch (.*)index.html#/client-login https://xyz.leadangel.com/index.html#/
the RewriteEngine rule is written on 000-default page from sites-enabled.