Click here to Skip to main content
15,889,595 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to redirect to a page when a user clicks on a button.... However the webpage that the user needs to be redirected to does not have an https:// or a www. If I insert those in front of the URL then it displays a problem....


If I click on it without the HTTPS it goes to:

http://localhost:52306/Home/km.tff-data.com

and it gives an IIS 8.0 Error 404 Not found...

Now if I add the https://... it takes me to...
a page not found....

however when I enter the URL into the webpage it works fine...

What I have tried:

HTML
<div class="col-md-6">
    <a href="km.tff-data.com" target="_blank" class="btn btn-warning" style="width:100%; height:75px">
        Delivery Matrix
    </a>
</div>

<div class="col-md-6">
    <a target="_blank" class="btn btn-warning" style="width:100%; height:75px">
        Delivery Matrix
    </a>
</div>
Posted
Updated 4-Mar-16 9:59am
v2
Comments
Member 12362975 4-Mar-16 12:46pm    
<div class="col-md-6">

Delivery Matrix

</div>

<div class="col-md-6">

Delivery Matrix

</div>
Member 12362975 4-Mar-16 12:48pm    
Uhm... I cant just paste my code it turns it into a hyperlink... I have tried an Href with https://km.tff-data.com
and just href with km.tff-data.com...

these are not the real links to the website... I cannot give out real links because they have data that cant be out there...
Matt T Heffron 4-Mar-16 13:02pm    
Have you tried prefixing with "http://" instead of "https://"?
Are you sure the "target" supports https?
Richard Deeming 4-Mar-16 13:15pm    
Sounds like the answer to me. :)

<a href="http://km.tff-data.com" ...
Richard Deeming 4-Mar-16 13:13pm    
You have to HTML-encoded your code blocks, and wrap them in <pre>...</pre> tags. Unfortunately, the formatting buttons aren't available for the "What have you tried" section, so you have to do this manually.

I've updated your question, and the code block now shows correctly.

1 solution

Solution was use Http:// instead of Https://.

thanks for the help!
 
Share this answer
 
Comments
Matt T Heffron 4-Mar-16 16:47pm    
You're welcome.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900