I have website with /admin folder. And have changed to /admin-cdn
with RewriteRule ^admin-cdn/(.*) admin/$1 [NC]
Now I can access files with /admin and /admin-cdn url
I want to show 404 error when user hit /admin and /admin/files.php url
I have tried this It was working fine. But when I entered url /admin it will redirect automatically to /admin/ and will give 404 error.
RewriteCond %{THE_REQUEST} admin/ [NC]
RewriteRule ^ - [L,R=404]
But I want to show 404 error on /admin url don't redirect to /admin/. Because It will give hint like there is a folder.