If you see "Index of /anyfolder/view.shtml" with a list of files, your server has directory listing enabled for that path.
location ~ \.shtml$ { internal; } Open IIS Manager, select the directory, double-click "Directory Browsing," and select "Disabled" in the Actions pane. Alternative: Using index.shtml Correctly In many cases, website owners actually intend to serve a default SHTML page when a user visits a directory. The proper configuration is to use DirectoryIndex (Apache) or index (Nginx) to load view.shtml as the default page, not as a directory listing. index of view.shtml
Options -Indexes If you need to disable indexing globally, ensure your <Directory> block does not include +Indexes . To also prevent access to .shtml source, add: If you see "Index of /anyfolder/view
Use the following search query to see if Google has already indexed your exposed directories: site:yourdomain.com intitle:"index of" "view.shtml" How to Disable Directory Indexing (The Fix) Preventing the index of view.shtml problem requires disabling directory listings on your web server. For Apache Servers ( .htaccess or httpd.conf ) Add the following line to the relevant configuration file or an .htaccess file inside the directory: The proper configuration is to use DirectoryIndex (Apache)
Enter a URL that ends with a directory name and a trailing slash, followed by view.shtml as a folder: https://yourdomain.com/anyfolder/view.shtml/