ooraopal Posted March 29, 2021 Report Share Posted March 29, 2021 Hi, I need to redirect direct folder access to my homepage using .htaccess I tried following but its' not working RewriteRule ^subdirectory/(.*)$ /$1 [R=301,NC,L] Currectly I add a blank index.html to each folder, but this is not a good solution. I want everytime someone tried to directly access an existing folder on my website it will redirected to homepage automatically via .htaccess Please help Regards Yunar Quote Link to comment Share on other sites More sharing options...
Brian Posted March 30, 2021 Report Share Posted March 30, 2021 Hello! .htaccess rules like this can be tricky as software you're using may automatically create rewrites and rules that contradict what you're trying to setup. For assistance with figuring that out (assuming you haven't already) please open a ticket at https://my.hawkhost.com/submitticket.php with our helpdesk team and provide them details of this issue. We'll be able to look into this specifically for your setup and try to get a rewrite working for you. Thanks! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.