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

Var dette svaret til hjelp?

 Print

Les også disse

multi line edit with php and mysql

Posted by recklessop, 01-15-2008, 09:54 PMDoes anyone know of an example of a php mysql script....

IE 6.0 and style.display

Posted by jon31, 03-23-2007, 05:14 PMHey folks, I'm working on some cool little AJAX scripts,...

hello

Posted by swebz, 03-13-2010, 04:57 AMAny one know how to make jquery drop down. Thanks...

Email issue

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

Sending commands to a socket (C++)

Posted by LindonNetworks, 09-19-2008, 05:53 PMI'm trying to write an SMTP wrapper and I'm...