Reputation: 6779
How to redirect HTTP call to HTTPS in delphi web server. I'm using Delphi stand alone web server and i installed SSL in my server. when I give request protocol as HTTPS, it working but I want to redirect HTTP to HTTPS. Can any one tell how to redirect?
Upvotes: 2
Views: 1355
Reputation: 912
If you have direct access to the webserver (e.g. you are creating an isapi or apache module) itself and you are in charge of the response you should use an http redirect as described on http://en.wikipedia.org/wiki/HTTP_301
Another (not recommended) variant is to output a html file like this:
<html>
<head>
<meta http-equiv="Refresh" content="0; URL=https://www.anewsite.com/">
</head>
<body></body>
</html>
Upvotes: 5