M
M
Michail Wowtschuk2017-05-23 19:31:30
Web development
Michail Wowtschuk, 2017-05-23 19:31:30

How to correctly implement redirect between your pages on the site?

Tell me how to implement a correct redirect between your pages on the site so that they are normally indexed by search engines?
Found two examples:
http.Redirect(w, r, "/login", 301)
and
http.Redirect(w, r, "/login", http.StatusFound)
http.StatusFound as I understand it 302 redirect, found in the description https ://golang.org/src/net/http/status.go

Answer the question

In order to leave comments, you need to log in

3 answer(s)
P
Papa, 2018-08-20
@raidesu

Get PCI DSS Certified

A
Aleksey Solovyev, 2018-08-20
@alsolovyev

The easiest way to form yandex .
Create a form with fields (name, title, etc.). It redirects to the payment page. You receive a report from the service using the link that you specified during the settings.

A
Alexander Pavlyuk, 2017-05-23
@wowtschuk

http.StatusMovedPermanently if your redirect is permanent (301)
http.StatusFound if your redirect is temporary (302)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question