我需要使用. htaccess重定向https://,http://到https://www。
这是我的基本网址https://www.mysite.co.bw/,我需要重定向https://mysite.co.bw/,http://mysite.co.bw/到基本网址使用.htaccess
我在CodeIgniter 3中做了这个网站。
这就是我到目前为止所做的。
RewriteEngine On
RewriteCond %{HTTP_HOST} ^mysite\.co\.bw$ [OR]
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://www.mysite.co.bw/$1 [R=301,L]
# Your existing CodeIgniter rules
RewriteCond $1 !^(index\.php|assets|images|js|css|uploads|favicon.png)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ ./index.php/$1 [L]
字符串
但是上面的代码对我不起作用。
1条答案
按热度按时间qlfbtfca1#
你可以这样使用somthinge:
字符串