1 回答
TA贡献2039条经验 获得超7个赞
刚刚找到问题的解决方案
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www.)?example.com$
RewriteCond %{REQUEST_URI} !^/Main-Site/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /Main-Site/$1
RewriteCond %{HTTP_HOST} ^(www.)?example.com$
RewriteRule ^(/)?$ Main-Site/ [L]
Options +SymLinksIfOwnerMatch
RewriteEngine On
# Apply these rules BEFORE rules in child .htaccess files
RewriteOptions InheritDownBefore
# HTTP to HTTPS redirect for all subdomains
RewriteCond %{HTTPS} !=on [NC]
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
ErrorDocument 206 /errors/206.html
ErrorDocument 301 /errors/301.html
ErrorDocument 302 /errors/302.html
ErrorDocument 400 /errors/400.html
ErrorDocument 401 /errors/401.html
ErrorDocument 403 /errors/403.html
ErrorDocument 404 /errors/404.html
ErrorDocument 408 /errors/408.html
ErrorDocument 500 /errors/500.html
ErrorDocument 501 /errors/501.html
ErrorDocument 503 /errors/503.html
- 1 回答
- 0 关注
- 88 浏览
添加回答
举报