Relative URL to a different port number in a hyperlink?

前端 未结 11 1850
心在旅途
心在旅途 2020-11-27 15:13

Is there a way without Javascript / server-side scripting to link to a different port number on the same box, if I don\'t know the hostname?

e.g.:

&l         


        
11条回答
  •  一整个雨季
    2020-11-27 16:14

    After wrestling with this I found actually that SERVER_NAME is a reserved variable. So, if you are on page (www.example.com:8080) you should be able to drop the 8080 and invoke another port. For instance this modified code just worked for me and moves me from any base port to port 8069 (replace your port as required)

    
    

提交回复
热议问题