wordpress - 在 wordpress 站点上使用共享 SSL

标签 wordpress ssl e-commerce shared

我正在尝试更改 wordpress ecom 插件以通过 ssl 运行结帐。我已设法更改插件以使用共享 ssl,但不断出现禁止错误。

以下将起作用:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
Options FollowSymLinks IncludesNoExec ExecCGI

RewriteCond %{SERVER_PORT} ^443$
RewriteRule ^[a-z0-9-_/]+$ mydomainname.co.uk/index.php

#RewriteCond %{SERVER_PORT} ^80$
#RewriteRule ^index\.php$ - [L]
#RewriteCond %{REQUEST_FILENAME} !-f
#RewriteCond %{REQUEST_FILENAME} !-d
#RewriteRule . /index.php [L]

</IfModule>

(注释掉其他 wordpress 内容)

我想添加

RewriteCond %{SERVER_PORT} ^80$

只有在端口 80 上才会触发以下语句,但似乎不起作用...有人有什么想法吗?

** 工作 **

<IfModule mod_rewrite.c>

RewriteEngine On
RewriteBase /
Options FollowSymLinks IncludesNoExec ExecCGI

RewriteCond %{SERVER_PORT} =443
RewriteRule ^[a-z0-9-_/]+$ mydomain.co.uk/index.php [L]

RewriteCond %{SERVER_PORT} =80
RewriteRule ^index\.php$ - [L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{SERVER_PORT} =80
RewriteRule . /index.php [L]

</IfModule>

最佳答案

尝试在第一个 RewriteRule 之后添加 [L] 限定符。

另外,你真的应该使用

RewriteCond %{SERVER_PORT} =443

而不是正则表达式。

关于wordpress - 在 wordpress 站点上使用共享 SSL,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6711546/

相关文章:

google-chrome - 在 Chrome 应用程序中使用证书进行 SSL 客户端身份验证

html - 如何从大量 Excel 工作表中删除短语

php - 为电子商务生成高度独特的字符串

javascript - 如何修复 split() undefined 和 onclick 事件上出现错误的 Javascript 代码?

php - Timthumb 没有在特定域中显示外部站点图像

php - 使用 Woocommerce 中的方法以编程方式设置自定义产品字段

WordPress 将所有 HTTPS 重定向到 HTTP

java - Android 客户端通过 SSL 连接到服务器

php - 如果不同的侧边栏在 WordPress 上处于事件状态,则不同的类

php - 在 Wordpress 中将特色图片添加到 RSS 提要