0

Google has been indexing duped content. SEO nightmare...

I have two forms which need SSL.

/single

/joint

I'd like everything else to be redirected back to non ssl (http://)

I've tried various different things from the forums here, numerous times...

How do I enable https only on certain pages with htaccess?

The first part always works, that is, https redirects to http but the /single & /joint will redirect to index.php or the "home page"

Thanks in advance for any advice.

Try to be more clear...

With Jon's code added to the .htaccess file

https .com/other-page

redirects to http .com/other-page

But the ones that matter

https .com/single & .com/joint

Both redirect to

http .com/index.php

Here is a link to the standard Joomla .htaccess file

http://docs.joomla.org/Preconfigured_htaccess

In addition I am using rewrite rules to redirect www to non www

RewriteCond %{HTTP_HOST} !^website.com RewriteRule (.*) http://website.com/$1 [R=301,L]

4

1 回答 1

0

将这些规则添加到文档根目录中的 htaccess 文件中:

RewriteEngine On

RewriteCond %{HTTPS} off
RewriteRule ^(single|joint) https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

RewriteCond %{HTTPS} on
RewriteRule !^(single|joint) http://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

只要表单作为 GET 请求提交。重定向后可能不包含 POST 提交中的请求正文。

于 2013-10-07T02:40:52.333 回答