Answer the question
In order to leave comments, you need to log in
How to disable directory listing and redirect at the same time?
There is a rather long link to the image, with slashes, each slash separates the folder of the file system
example.com/bla/blabla/blablabla/image.jpg
And changing the link for example, like this:
example.com/bla/blabla/blablabla
without the disabled directory listing we see the files in the blablabla folder, which is not good.
Applying
Options -Indexes
in the .htaccess of the project and opening the link example.com/bla/blabla/blablabla, we see the standard error 403, forbidden.
How to make it so that when visiting the link example.com/bla/blabla/blablabla , there is a redirect to a custom 404 page, for example, example.com/404.php or to the main example.com? Using standard web server tools, by adding some option to htaccess or to the virtualhost of the web server
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question