简体   繁体   English

如果未在Php中登录,则需要索引重定向到HomePage

[英]Needs indexes to redirect to HomePage if not logged-in in Php

I am having a problem in the simple webpage I've been working for. 我在我一直在努力的简单网页上遇到了问题。 After I uploaded it in the network,some of the files are visible like this 我将其上传到网络后,有些文件可见 在此输入图像描述

I hope someone can help me with my problem. 我希望有人可以帮我解决我的问题。

Just place an .htaccess file in your root web directory with this information: 只需使用以下信息将.htaccess文件放在根网站目录中:

Options -Indexes

This will prevent the contents of your directory from being listed. 这将阻止列出目录的内容。 You can also place a blank index.html file in there and that would show a blank page when someone attempted to open up that directory. 您还可以在其中放置一个空白的index.html文件,当有人试图打开该目录时,该文件将显示空白页面。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM