English 中文(简体)
direct http to https on certain pages?
原标题:
  • 时间:2009-11-17 17:26:47
  •  标签:
  • ssl
  • https

Hi I have added the below code to .ht access but how can I add another page to this? such as login.php

also if the user types in www. they get a "untrusted connection" as the SSL is only valid without the www. how could I fix this?

Thanks

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteCond %{REQUEST_URI} /login.html
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
最佳回答

Your first question doesn t really give the required information to write the rewrite rule. Upon what criteria do you want to redirect them to login.php?

As far as the SSL issue;

RewriteCond %{HTTP_HOST} ^www.(.*)$ [NC]
RewriteRule ^(.*)$ https://%1/$1 [R=301,L]

RewriteCond %{HTTPS} != on
RewriteRule ^(.*)$ https://$1 [L]
问题回答

This way is very useful for my personal blog page

i m add this code to .htaccess

RewriteEngine On RewriteCond %{SERVER_PORT} 443 RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

Good Luck and Thanks,

Belajar Internet Marketing





相关问题
ssl on login form?

I have SSL on my website....when the user logs in from a http page the form action is sent to https page, would this still secure the posted data? Or would it be better to have the form and the page ...

SSL slowness in EC2

We ve deployed our rails app to EC2. In our setup, we have two proxies on small instances behind round-robin DNS. These run nginx load balancers for a dynamically growing and shrinking farm of web ...

Why can t I find the truststore for an SSL handshake?

I m using the Spring RESTTemplate on the client side to make calls to a REST endpoint. The client in this case is a Spring app and Tomcat is the servlet container. I m running into issues making a ...

To add more parameter for my http header for SSL/TLS

As far as I understand, https is http plus SSL/TLS. What do I need to do if I want to add 3 more parameters for the header? I found a file inside Mozilla s NSS - ssl3ext.c, but I don t understand it ...

Why am I getting handshake_failure with Java SSL cert?

I m trying to use Hudson (which uses SVNKit) to access a Subversion repository that requires a client certificate to access it. I can access the same repository using the same client certificate via ...

热门标签