Easy A
Would you like to react to this message? Create an account in a few clicks or log in to continue.


 
HomeHome  Latest imagesLatest images  SearchSearch  RegisterRegister  Log inLog in  

Share
 

 .htaccess force http to https

View previous topic View next topic Go down 
AuthorMessage
Momment
Member
Member
Momment

Posts : 19
Join date : 2011-03-09

.htaccess force http to https  Empty
PostSubject: .htaccess force http to https    .htaccess force http to https  EmptyFri Mar 25, 2011 6:57 am

I want my domain. www.mozzi.co.za to automailty redirect a https instead of http

im very new at this.. so a helping hand would be great please.

I need this...
www.mozzi.co.za/secure/cars/ once I get to this directory it mus check if its http or https.. if http then htaccess must make it https....

Code:

RewriteEngine on

# Ensure correct host
RewriteCond %{HTTP_HOST} www.mozzi.co.za/secure/cars
RewriteRule (.*) https://www.mozzi.co.za/secure/cars/$1 [R=301]
Back to top Go down
Understand
Member
Member
Understand

Posts : 21
Join date : 2011-03-09

.htaccess force http to https  Empty
PostSubject: Re: .htaccess force http to https    .htaccess force http to https  EmptyFri Mar 25, 2011 6:58 am

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
Back to top Go down
Knowledge
Member
Member
Knowledge

Posts : 21
Join date : 2011-03-09

.htaccess force http to https  Empty
PostSubject: Re: .htaccess force http to https    .htaccess force http to https  EmptyFri Mar 25, 2011 6:59 am

Understand wrote:
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

haha nice screen name :)
Anyways.

Code:

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

Code:

RedirectPermanent http://www.mozzi.co.za/ https://www.mozzi.co.za/

best regards
Back to top Go down
Sponsored content




.htaccess force http to https  Empty
PostSubject: Re: .htaccess force http to https    .htaccess force http to https  Empty

Back to top Go down
 

.htaccess force http to https

View previous topic View next topic Back to top 
Page 1 of 1

 Similar topics

-
» If blocking china and the russians with .htaccess won't do it...
» How to force WWW ?

Permissions in this forum:You cannot reply to topics in this forum
Easy A :: .htaccess force http to https  Edit-trash Useless :: Trash-