# Problem Redirecting from http: to https: - (JS)

**URL:** <https://forum.kirupa.com/t/problem-redirecting-from-http-to-https-js/122129>\
**Category:** Uncategorized\
**Created:** [September 10, 2004, 3:19pm UTC](https://forum.kirupa.com/t/problem-redirecting-from-http-to-https-js/122129 "2004-09-10T15:19:45Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kaykills](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/kaykills/32/228_2.png) [@kaykills](https://forum.kirupa.com/u/kaykills)\
**Post date:** [September 10, 2004, 3:19pm UTC](https://forum.kirupa.com/t/problem-redirecting-from-http-to-https-js/122129/1 "2004-09-10T15:19:45Z")

</div>

Hi,  
I have been trying to create a redirect to my companies’ site that would redirect a user to a secure page. The problem that is occurring is that if someone goes to our site ([agentsonly.encorecruises.com](http://agentsonly.encorecruises.com)) they are prompted for a username and password. Once they get passed that, they can then click on a link. Any link they click on leads to an encrypted page and for some reason they are prompted for a username and password again. So basically it prompts when the user is on the http side AND the https side. I just want the username and password to come up once, hence the redirect if someone types in [agentsonly.encorecruises.com](http://agentsonly.encorecruises.com).

I am having no success and would welcome any kind of suggestions. I was not sure if I should post in here or on server side.

Cheers  
Michael
