Rabu, 06 Juni 2018

Sponsored Links

Keep Your Old URLS with Simple 301 Redirects Plugin for WordPress ...
src: i.ytimg.com

The HTTP response status code 301 Moved Permanently is used for permanent URL redirects, which means the current link or record uses URLs whose responses are accepted to be updated. New URLs should be provided in the Location field that is included with the response. 301 redirects are considered best practices for increasing users from HTTP to HTTPS.

RFC 2616 states that:

  • If the client has the ability to edit links, it must update all references to the Request URL.
  • The response can be cached unless otherwise indicated.
  • Unless the request method is HEAD, entities must contain hypertext notes with hyperlinks to new URLs.
  • If the 301 status code is accepted in response to a request of any type other than GET or HEAD, the client must ask the user before diverting.


Video HTTP 301



Contoh

Client Request:

  GET/index.php HTTP/1.1  Host: www.example.org  

Server response:

  HTTP/1.1 301 Moved Permanently  Locations: http://www.example.org/index.asp  

Here's an example using an.htaccess file to redirect an unsafe URL to a secure address without the "www" prefix:

 RewriteEngine On  RewriteCond% {HTTPS} is off  RewriteCond% {HTTP_HOST} ^ www \. (. *) $ [NC]  RewriteRule ^ (. *) $ Http://% 1/$ 1 [R = 301, L]    RewriteCond% {HTTPS} is active  RewriteCond% {HTTP_HOST} ^ www \. (. *) $ [NC]  RewriteRule ^ (. *) $ Https://% 1/$ 1 [R = 301, L]    RewriteEngine On  RewriteCond% {SERVER_PORT} 80  RewriteRule ^ (. *) $ Https://example.com/$1 [R, L] 

Here's an example of using a PHP redirect:

Simple equivalent for nginx configuration:

 location/old/url/{  Â Â Â Â return 301/new/url/;  } 

Here's one way to redirect using Express.js:

 app.all ("/old/url", (req, res) = & gt; {  Â Â Â Â res.redirect (301, "/new/url");  }); 

Search engine

Both Bing and Google recommend using 301 redirects to change the page URL as shown in search engine results.

Maps HTTP 301



See also

  • Hypertext Transfer Protocol
  • List of HTTP status codes
  • URL redirects

The ABC of HTTP (Status Codes) - DeepCrawl
src: www.deepcrawl.com


References


Redirect http 301 all calls via sdoapp to wwwschemaorg 3329438 ...
src: www.elie.net


Bibliography


WantedBricks Building Set 301 The Eiffel Tower .Ebay link: http ...
src: s-media-cache-ak0.pinimg.com


External links


Source of the article : Wikipedia

Comments
0 Comments