NameSilo

How to redirect from http to https

SpaceshipSpaceship
Namecheap AuctionsNamecheap Auctions
SpaceshipSpaceship
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
Close
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
Close
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
Close
AIVikingsAIVikings

We're social

Escrow.com
Spaceship
Domain Recover
CryptoExchange.com

NamePros updates

Switch between accounts
You can now stay logged in to more than one NamePros account in the same browser. Click your avatar, then "Accounts in this browser", to...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back