Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>A <strong><a href="http://en.wikipedia.org/wiki/URL_redirection" rel="nofollow noreferrer">redirect</a></strong> is a response that is given by a webserver, that asks the user agent to not show the response body, but instead request a different resource.</p> <p>The HTTP protocol provides 2 methods of redirection, a <code>302</code> temporary redirect and a <code>301</code> permanent redirect. There are some more 300 status codes you can find a complete list <strong><a href="http://en.wikipedia.org/wiki/List_of_HTTP_status_codes" rel="nofollow noreferrer">here</a></strong>. User agents and clients must adjust accordingly when a 301 redirect is given so that future requests for the same URL won't be requested in favor of the permanent redirect.</p> <p>A redirect in HTTP is used for various purposes:</p> <ul> <li>To perform load balancing.</li> <li>As part of the <a href="/questions/tagged/post-redirect-get" class="post-tag" title="show questions tagged &#39;post-redirect-get&#39;" rel="tag">post-redirect-get</a> pattern.</li> </ul> <p>Redirection can also be perform on the client-side using a client-side scripting language (<a href="/questions/tagged/javascript" class="post-tag" title="show questions tagged &#39;javascript&#39;" rel="tag">javascript</a>) without any server intervention.</p> <p>Javascript code for redirection:</p> <pre><code>window.location.assign("url"); </code></pre> <p><hr> Server-side languages such as PHP can edit the HTTP headers to create a redirect. In PHP:</p> <pre><code>header('Location: redirectedTo.php', TRUE, 301); </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload