.htaccess redirect all pages to https://www

Posted by LJ Host, 07-17-2007, 01:50 PM
Hi guys, I'm not to good with htaccess so I need your help. I am able to find information on the 2 items I am looking for separately but not together. I need all pages on a site to redirect to the www ssl version of the page. so.. http://site.com/anypage.php > https://www.site.com/anypage.php http://www.site.com > https://www.site.com http://site.com/test/test.php > https://www.site.com/test/test.php Thanks so much for your help!

Posted by SparkSupport, 07-17-2007, 02:19 PM
Add this directives to your .htaccess file. ----------------------------------------------- RewriteEngine On RewriteCond %{SERVER_PORT} !^443$ RewriteRule ^/(.*) https://%{SERVER_NAME}/$1 [L,R] -----------------------------------------------

Posted by LJ Host, 07-17-2007, 02:29 PM
I see that will force to ssl but will it force to the www version?

Posted by SparkSupport, 07-17-2007, 02:42 PM
Use this one for www. --------------------------- RewriteEngine On RewriteCond %{SERVER_PORT} !^443$ RewriteRule ^/(.*) https://www.site.com/$1 [L,R]

這篇文章有幫助嗎?

 列印本文

Also Read

Loading proress bar before iframe

Posted by bambinou, 11-16-2012, 11:39 AMHello, I have an hotel booking affiliate iframe that...

Command for tranferring files through wget

Posted by ramdak5000, 07-16-2007, 10:24 PMI am trying to move over a client from Verio's hosting...

Email issue

Posted by manindarkjp, 03-30-2008, 08:31 AMHello, I have a dedicate server and got a problem...

aletia reseller

Posted by hostchecker, 09-27-2001, 05:36 PMwhas the URL for aletia reseller plans? Posted by...

Free host sites.

Posted by abbas, 09-17-2001, 06:01 AMHi. I want to start a free host site similar to...