【发布时间】:2017-11-19 01:29:31
【问题描述】:
我的客户有一个名为“https://buzzbehind.com/”(主域)的域。还有一些子域。子域网址之一是“http://buzzmembers.buzzbehind.com”(BuzzMembers)。
实际上一个主域和子域都有 SSL 证书。因此,当我们使用“https”点击 URL 时,除了 BuzzMembers 之外,它们都可以正常工作。
如果我尝试使用 https 访问 BuzzMembers 的 URL,它会显示主域的不同子域 BuzzAdmin32 的布局。但网址是正确的。
Buzzbehind(主域)的Htaccess文件:
DirectoryIndex home.php index.html index.htm index.php
RewriteEngine On
RewriteRule ^(promotionalpage)/(index)/([^/]*)/([^/]*)/([^/]*)/$ https://buzz.buzzbehind.com/promotionalpage/index/$3/$4/$5/ [r=301,L]
RewriteRule ^(productdetails)/(index)/([^/]*)/([^/]*)/([^/]*)/$ https://buzz.buzzbehind.com/productdetails/index/$3/$4/$5/?current_url=https://buzz.buzzbehind.com/promotionalpage/index/$4/$3/$5 [r=301,L]
RewriteCond %{HTTPS} on
RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
BuzzMember 的 Htaccess 文件:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php/$1 [L]
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ http://%1%{REQUEST_URI} [R=301,QSA,NC,L]
BuzzAdmin32 进程:
#RewriteEngine on
#RewriteCond $1 !^(index\.php|images|robots\.txt)
#RewriteRule ^(.*)$ /index.php/$1 [L]
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php?$1 [L]
</IfModule>
RewriteCond %{HTTPS} !=on
RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [R,L]
RewriteCond %{HTTP_HOST} ^www\.buzzadmin32\.buzzbehind\.com$
RewriteRule ^/?$ "http\:\/\/buzzadmin32\.buzzbehind\.com\/" [R=301,L]
我需要使用 https 运行 BuzzMembers 站点。现在它只适用于http。 请给我建议。
BuzzMembers 框架:Codeigniter
提前致谢。
【问题讨论】:
-
您的意思是您需要buzzmembers.buzzbehind.com 才能使用 SSL 正常服务(地址栏上的绿色,而不是红色),对吗?然后您需要一个包含此主机名的证书,或者您需要一个通配符证书 *.buzzbehind.com 来提供所有服务。它与你在服务器上使用什么框架无关。
-
@KenCheung 请检查此链接 -> sslshopper.com/…
-
@KenCheung 我检查了所有关于 SSL 的设置都很好。但我希望这与 .htaccess 有关。
-
其实我是用浏览器访问buzzmembers.buzzbehind.com,可以看到你的登录页面。有什么问题?我也尝试登录,它再次使用 URI /login 返回登录页面,听起来一切正常。
-
@KenCheung 否。这不是正确的页面。真实页面应该类似于buzzmembers.buzzbehind.com。如果您使用 https 而不是 http,那么您将看到登录表单。登录表单页面不正确。
标签: php .htaccess codeigniter ssl-certificate subdomain