俺乃小潜mg 发表于 2024-9-11 18:03:54

linux云服务器apache下设置指定域名跳转到https

域名根目录下新建 .htaccess , 添加

RewriteEngine on

#不显示index.php

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php/$1

#指定80端口域名 lam.xx8.top 跳转到 https://lam.xx8.top
RewriteCond %{HTTP_HOST} ^lam.xx8\.top
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://lam.xx8.top/$1
页: [1]
查看完整版本: linux云服务器apache下设置指定域名跳转到https