我正在建立一個(gè)啟用 https 的 MyBB 論壇。我已設(shè)置并啟用 TLS,并且我的主機(jī)啟用了 https 重定向。直接鏈接如http://www.example.com/index.php并example.com/index.php正確重定向到https://www.example.com/index.php. 但任何任何嘗試都直奔https://www.example.com/去去https://www.www.example.com/。有誰對可能導(dǎo)致這種情況的原因有任何想法嗎?我的 .htaccess 文件如下(大部分取自 MyBB 的默認(rèn) .htaccess 設(shè)置。) Options -MultiViews +FollowSymlinks -Indexes<FilesMatch "\.(php|html)$"> Header set Cache-Control "private, no-cache" Header set Pragma "no-cache"</FilesMatch>## If mod_security is enabled, attempt to disable it.# - Note, this will work on the majority of hosts but on# MediaTemple, it is known to cause random Internal Server# errors. For MediaTemple, please remove the block below#<IfModule mod_security.c> # Turn off mod_security filtering. SecFilterEngine Off # The below probably isn't needed, but better safe than sorry. SecFilterScanPOST Off</IfModule>## MyBB "search engine friendly" URL rewrites# - Note, for these to work with MyBB please make sure you have# the setting enabled in the Admin CP and you have this file# named .htaccess#<IfModule mod_rewrite.c> RewriteEngine on RedirectMatch ^/$ news.php RewriteRule ^forum-([0-9]+)\.html$ forumdisplay.php?fid=$1 [L,QSA] RewriteRule ^forum-([0-9]+)-page-([0-9]+)\.html$ forumdisplay.php?fid=$1&page=$2 [L,QSA] RewriteRule ^thread-([0-9]+)\.html$ showthread.php?tid=$1 [L,QSA] RewriteRule ^thread-([0-9]+)-page-([0-9]+)\.html$ showthread.php?tid=$1&page=$2 [L,QSA] RewriteRule ^thread-([0-9]+)-lastpost\.html$ showthread.php?tid=$1&action=lastpost [L,QSA] RewriteRule ^thread-([0-9]+)-nextnewest\.html$ showthread.php?tid=$1&action=nextnewest [L,QSA] RewriteRule ^thread-([0-9]+)-nextoldest\.html$ showthread.php?tid=$1&action=nextoldest [L,QSA] RewriteRule ^thread-([0-9]+)-newpost\.html$ showthread.php?tid=$1&action=newpost [L,QSA]
MyBB 重定向至 www.www
慕的地6264312
2023-09-15 10:15:46