: How can we avoid showing content of subdomain I have create a sub domain like images.domain.com. accessing it via browser it is listing the content at sub domain. like Index of /
I have create a sub domain like images.domain.com.
accessing it via browser it is listing the content at sub domain.
like
Index of /
content1/
content2/
content3/
I dont want to show the content of sub domain.
How to achieve this?
More posts by @Ravi8258870
1 Comments
Sorted by latest first Latest Oldest Best
You seem to have directory Indexes enabled (Apache automatically creates a directory listing in such cases). You can workaround this by either placing an empty index.html file in the document root of the subdomain (assuming index.html is a registered index document).
Or, disable directory Indexes in your .htaccess file (in the document root of your subdomain, or even in the document root of your main domain, depending on your file system structure.):
Options -Indexes
Reference: Apache Docs - Options Directive:
Indexes
If a URL which maps to a directory is requested and there is no DirectoryIndex (e.g., index.html) in that directory, then mod_autoindex will return a formatted listing of the directory.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.