0

I have a question about htaccess. I have a rather complex website structure on the server and I use htaccess for redirection.

the site structure is as follows

web/project/test_project/
├─ admin/
├─ catalog/
├─ index.php

In web/ folder I have .htaccess and and my question is how can i make admin folder accessible from url example.com/dashboard. I know it can be done with rewrite rule. But my second quest - is there any way to block direct access via example.com/web/project/test_project/admin?

I'm at the stage where I have rewrite rule access set up, but I don't know how to combine that with blocking direct access.

RewriteCond %{REQUEST_URI} dashboard
RewriteRule ^dashboard(/.*|$) /project/test_project/admin/$1 [L,QSA]

Thank you very much

0 Answers0