Mobile app version of vmapp.org
Login or Join
Ravi8258870

: 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 /

@Ravi8258870

Posted in: #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 /

content1/
content2/
content3/


I dont want to show the content of sub domain.

How to achieve this?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Ravi8258870

1 Comments

Sorted by latest first Latest Oldest Best

 

@Ogunnowo487

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.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme