你如何做到这一点,你可以自动重定向到存储在.txt文件中的另一个链接?

I have a link of a website stored in a .txt file, I want it so whenever I visit my site it will auto redirect to the link in the .txt file. Is this possible with HTML? If not, I am happy with another coding language. Thank you!

Not in pure HTML, however you can achieve this with some javascript for example -

<html>
<head>
    <script type="text/javascript">
        function redirectToUrl() {
            var rawFile = new XMLHttpRequest();
            rawFile.open("GET", "http://YourServer/yourtextfile.txt", true);
            rawFile.onreadystatechange = function () {
                if (rawFile.readyState === 4) {
                    var url = rawFile.responseText;
                    document.location = url;
                }
            }

            rawFile.send();
        }
        redirectToUrl();
    </script>
</head>

<body>
    Redirecting!
</body>
</html>

No, it is not possible in pure HTML.

However, you can do it very easily in Javascript included in your HTML page. This is a pretty clear example of how to read in a text file in Javascript.