A
A
Alexander Interesting2021-09-17 09:20:49
Java
Alexander Interesting, 2021-09-17 09:20:49

How to redirect to a socket server?

I'm doing something like my apatch and I'm stuck on the topic, how to make a redirect so that the user is redirected to the specified url?

The Location header is not working, or something needs to be changed so that browsers understand that a redirect needs to be done
6144339807a52418641427.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
sergey, 2021-09-18
@Swimergg

your server should return
status 301
sendHeader("HTTP/1.1 301 Moved Permanently");
or 302
sendHeader("HTTP/1.1 302 Found");

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question