Http to Https Classic .asp site

Discussion in 'Classic ASP' started by Nelly, Apr 28, 2019.

Tags:
  1. Hi

    Im looking for someone preferably discount asp staff that can help me implement https across my site.

    I currently have SSl certificate installed through my account.

    The site has some url rewrite/redirect rules - webconfig file written approx 4yrs ago

    Ive looked at this knowledge base article https://support.discountasp.net/kb/a1524/force-https-with-url-rewrite.aspx and as im not a developer not quite sure how to integrate the suggested code with that already implemented on my site's webconfig file.

    Im assuming that because i have the SSl cert installed once the http to https rule is implemented that I'll be good to go therefore I would be grateful if someone could help me out with this.

    If it would help by uploading the current webconfig file code i could do this.

    Thanks in advance.

    Ps i have a wordpress directory on my site, i'm assuming that i can achieve my goals with a plugin as ive done on my other standalone wordpress site.
     
  2. RayH

    RayH DiscountASP.NET Lackey DiscountASP.NET Staff

    You can add the URL Rewrite rules found here.
     
  3. Hi & thanks RayH

    Do i just add that to my webconfig file before ( on top of) the rules(s) that already exsit?
     
  4. Read the contents in the link and now my heads going to explode!

    that is the ms link in the article ...http://msdn.microsoft.com/en-us/library/ms972974.aspx

    but if you are just talikng about this snippet of code ...

    <rewrite>

    <rules>

    <rule name="Redirect to HTTPS" stopProcessing="true">

    <match url="(.*)" />

    <conditions>

    <add input="{HTTPS}" pattern="^OFF$" />

    </conditions>

    <action type="Redirect" url="https://{HTTP_HOST}/{R:1}" />

    </rule>

    </rules>

    </rewrite>

    Can this just be added before the existing rewrite code?
     
    Last edited: Apr 28, 2019
  5. Update

    Ive tired adding the code to my current wedconfig file and no matter where i put it or how i edit it, it throws a 505 server error!

    obviously im doing something wrong

    any suggestions?
     
  6. okay

    i managed to connect to my site via iis manager.

    I have tried three different tutorials that all differ slightly and could not get things to work.

    Errors that i have encountered during my quest....
    • 505 server error
    • 'too many redirects' page could not load
    I previously had a rewrite to show - www.mysite.com now it defaults to www.mysite.com/default.asp?

    so ive obviously changed something even when i reupload the original webconfig file it has the /default.asp? url

    Pointers please
     
  7. RayH

    RayH DiscountASP.NET Lackey DiscountASP.NET Staff

    Hi Nelly,

    Sorry for the late reply, but you should be able to add that rule right before all your others for it to work. Unfortunately, I'm not sure why you're getting a 505 error (never seen that myself). I would look have to look at your web.config file and rules to see what the problem might be.
     

Share This Page