Unstoppable Domains

How to redirect from http to https

Spaceship Spaceship
Watch

teclance

Established Member
Impact
1
Hi guys,

I am running oscommerce and I have a SSL installed.

There are certain pages that I only want accessible via https so if any one types in: http://sitename.com/account.php it will redirect to https://sitename.com/account.php

I tried using .htaccess to do this by entering:
Redirect /account https://sitename.com/account.php
but the site keeps looping and never loads.

Any suggestions is appreciated.
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
Mod rewrite would be an easy and quick way, google it there are some tutorials that would make it really easy. If you cant get it after that PM me I can help.
 
0
•••
Here ya go...put this in a .htaccess file in the root of the public folder for the non-secure URL:

Code:
RewriteEngine On
RewriteRule ^(.*)$ https://www.yourdomain.com/$1 [R,L]
 
0
•••
Dynadot — .com Registration $8.99Dynadot — .com Registration $8.99

We're social

Unstoppable Domains
Domain Recover
DomainEasy — Live Options
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back