Dynadot .com transfer sale, only $10.12 with coupon code DYNA12, available while supplies last, ends October 31, 2026.

How to redirect from http to https

Namecheap AuctionsNamecheap Auctions
Namecheap AuctionsNamecheap Auctions
Spacemail by SpaceshipSpacemail by 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
•••
AIVikingsAIVikings

We're social

Escrow.com
Spaceship
Escrowly
CryptoExchange.com
Domain Recover

NamePros updates

New in Parking: updated way to act on many domains or inquiries at once
Your domain list and inquiry list now have a bar above and below the list. Check the items you want, then choose an action in the bar...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back