DirectAdmin打开网站根目录下的.htaccess文件,粘贴代码如下:(域名请更换为自己的)

 <IfModule mod_rewrite.c>

RewriteEngine On
RewriteCond %{HTTP_HOST} ^kaixuan.org [NC]
RewriteRule ^(.*)$ https://www.kaixuan.org/$1 [L,R=301]
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.kaixuan.org/$1 [R,L]

RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L] 
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L] </IfModule>
Last modification:December 21, 2021
如果觉得我的文章对你有用,请随意赞赏