.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]

Kas see vastus oli kasulik?

 Prindi artikkel

Loe veel

Help with signature settings

Posted by Egots, 03-24-2007, 03:27 PMIf I have max chars allowed set at 100 in vBulletin does...

Eaccellerator?

Posted by dragon2611, 01-12-2008, 09:13 PMI believe I understand what it does (cache php scripts...

How to call/load .net dll(C#) from c++ code?

Posted by TajByte, 03-22-2007, 04:50 AMHow to call/load .net dll(C#) from c++ code? Posted...

Auto Block IP Windows 2003

Posted by directhostinguk, 05-06-2007, 02:39 PMAnyone got any ideas how to detect and block IP’s...

constantly blocked on pop3

Posted by Calibaba, 09-14-2007, 05:50 PMI just setup a new pop account in Outlook 2007 and...