Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/.htaccess/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
.htaccess Can';t通过mydomain.com/directory访问网页_.htaccess_Http Status Code 404_Cloudflare - Fatal编程技术网

.htaccess Can';t通过mydomain.com/directory访问网页

.htaccess Can';t通过mydomain.com/directory访问网页,.htaccess,http-status-code-404,cloudflare,.htaccess,Http Status Code 404,Cloudflare,我想Cloudflare有问题。我刚刚设置了Cloudflare,现在我无法通过http://www.mydomain.fake/forumas但可以通过http://www.mydomain.fake/forumas/index.php 访问http://www.mydomain.fake/forumas我收到一个404错误。怎么办?您只需要在根目录的顶部有一个DirectoryIndex指令。htaccess: DirectoryIndex index.php 默认情况下,这将在任何目录中

我想Cloudflare有问题。我刚刚设置了Cloudflare,现在我无法通过
http://www.mydomain.fake/forumas
但可以通过
http://www.mydomain.fake/forumas/index.php


访问
http://www.mydomain.fake/forumas
我收到一个404错误。怎么办?

您只需要在根目录的顶部有一个
DirectoryIndex
指令。htaccess:

DirectoryIndex index.php
默认情况下,这将在任何目录中加载
index.php