三亩地
- 三亩地 2018-01-25 已签到连续签到1天,获得了5个金钱
web目录下的.htaccsee完整配置,不论是一级域名还是二级域名都可以访问,已经经过测试: Options +FollowSymlinks IndexIgnore */* RewriteEngine On RewriteCond %{SERVER_PORT} 80 RewriteRule (.*) https://%{SERVER_NAME}/$1 [R,L] RewriteCond %{SERVER_PORT} !^443$ RewriteRule (.*) https://%{SERVER_NAME}/$1 [R] # if a directory or a file exists, use it directly RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d # otherwise forward it to index.php RewriteRule . index.php RewriteRule \.svn\/ /404.html RewriteRule \.git\/ /404.html
- 三亩地 赞了回答RewriteEngine On RewriteBase / RewriteCond %{HTTPS} !=on RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] # BEGIN WordPress RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php [L,E=PATH_INFO:$1]
应该是写在配置文件里面弄吧
server { listen 80; server_name jcwxcc.com www.jcwxcc.com; rewrite ^(.*) https://www.jcwxcc.com$1 permanent; # abc.com对应修改为您自已的域名 }
nginx 的 供参考
我把问题补充了一下,后来把web下的.htaccess的配置改成
RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ https://zhanxiang.okcaiyi.com/$1 [R=301,L] RewriteCond %{SERVER_PORT} !^443$ RewriteRule (.*) https://%{SERVER_NAME}/$1 [R]
是404
ssl证书配置是:** Listen 443 <VirtualHost *:443> DocumentRoot "C:\WWW\demo1\backend\web" ServerName test.ssl1.com ServerAlias test.ssl1.com <Directory "C:\WWW\demo1\backend\web"> Options FollowSymLinks ExecCGI AllowOverride All Order allow,deny Allow from all Require all granted </Directory> SSLEngine on SSLProtocol all -SSLv2 -SSLv3 SSLCipherSuite HIGH:!RC4:!MD5:!aNULL:!eNULL:!NULL:!DH:!EDH:!EXP:+MEDIUM SSLHonorCipherOrder on SSLCertificateFile "C:\Program Files\Apache\cert\ssl1\public.pem" SSLCertificateKeyFile "C:\Program Files\Apache\cert\ssl1\214389064350038.key" SSLCertificateChainFile "C:\Program Files\Apache\cert\ssl1\chain.pem" </VirtualHost>
- 三亩地 2018-01-15 已签到连续签到2天,获得了10个金钱
- 三亩地 2018-01-14 已签到连续签到1天,获得了5个金钱
- 三亩地 赞了教程yii2 GridView常见操作