![](/img/trans.png)
[英]Although I created the route correctly But when I try to show the page It gives me an error page not found
[英]I created a subdomain and when I try to reach it , it gives access denied error
我创建了一个子域。 (track.example.com)
我使用直接管理面板,所以我设置了根
公共: /domains/track.example.com/public_html
私人: /domains/track.example.com/private_html
我将文件复制到上面的两个文件夹中。 现在,当我尝试加载track.example.com
时,它会引发 403 错误。 问题是什么?
(更新:当我尝试使用 HTTPS 加载地址时。它工作正常!)
(更新 2:当我尝试直接请求 index.php 时,网站加载正常!)
我的日志: 2021-12-09 09:45:56.848516 [INFO] [16025] [151.246.223.141:23540#APVH_www.track.example.com] Auto Index is disabled for [/home/h170081/domains/example.com/public_html/track/], access denied
htaccess 内容:
Options +FollowSymLinks -MultiViews
# Turn mod_rewrite on
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} !=localhost
RewriteCond %{HTTP_HOST} !=127.0.0.1
RewriteCond %{REMOTE_ADDR} !=127.0.0.1
RewriteCond %{REMOTE_ADDR} !=::1
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?$1 [L,QSA]
RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s(.*)/index\.php [NC]
RewriteRule ^ $1 [R=302,L]
ErrorDocument 404 /notfound.php
我以前也遇到过同样的问题。 您需要将所有track.example.com
内容移动到此路径: /domain/example.com/public_html/track
您还需要删除子域的现有设置并将其设置为默认值。
原因是您的服务提供商将允许的路径设置为我提到的路径。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.