[英]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.