http-status-code-301

HTTP redirect: 301 (permanent) vs. 302 (temporary)

会有一股神秘感。 提交于 2019-12-27 10:42:07
问题 Is the client supposed to behave differently? How? 回答1: Status 301 means that the resource (page) is moved permanently to a new location. The client/browser should not attempt to request the original location but use the new location from now on. Status 302 means that the resource is temporarily located somewhere else, and the client/browser should continue requesting the original url. 回答2: When a search engine spider finds 301 status code in the response header of a webpage, it understands

Simple 301 redirect with htaccess

蓝咒 提交于 2019-12-25 09:26:53
问题 I want to redirect a URL from a page that is no longer active. The URL https://tchibo.academyofsports.promo/ as well as all subpages should be redirected to the URL http://www.academyofsports.de/. This is what I have so far (.htaccess): #Redirects RewriteEngine On RewriteRule https://tchibo.academyofsports.promo/ http://www.academyofsports.de/ [L,R=301] Unfortunately it does not work in this way. What am I doing wrong? 回答1: This one probably is what you are looking for: RewriteEngine On

Nginx - 301 redirect www and non-www to https-non-www not working

别等时光非礼了梦想. 提交于 2019-12-25 04:26:27
问题 The redirection I made from www and non-www to the https-non-www uri of my web site doesn't work. Here my server block : server { listen 80; listen [::]:80; server_name gfelot.xyz www.gfelot.xyz; return 301 https://gfelot.xyz$request_uri; } server { listen 443 ssl http2 default_server; listen [::]:443 ssl http2 default_server; include snippets/ssl-gfelot.xyz.conf; include snippets/ssl-params.conf; server_name gfelot.xyz; access_log /var/log/nginx/gfelot.xyz.access.log; error_log /var/log

301/302 with document body showing 'click here if your browser doesn't redirect you' anchor

為{幸葍}努か 提交于 2019-12-25 03:49:15
问题 We will be implementing a tiny document body with all our 301 and 302 responses. They will contain a small bit of html with an anchor pointing towards the URL where the user should be redirected. Are there any pitfalls or things we should know about when doing this or is it as simple as including the html in the document body when sending out a 'location' header? 回答1: If browser will see 301/302 HTTP result code it will IGNORE document/response body and will do instant redirect to the URL

.htaccess and 301 redirect (dynamic pages) wordpress

点点圈 提交于 2019-12-25 02:00:57
问题 I read all the other similar questions, but could not understand how to set it up so my old pages redirect where they should. Here is my set up: My old site pages: http://www.oldsite.com/blog/?p=1234 http://www.oldsite.com/blog/?p=432 http://www.oldsite.com/blog/?p=xxxx I would like to redirect the first two like so: http://www.oldsite.com/blog/?p=1234 -> http://www.newsite.com/somewhere/on/mysite/ http://www.oldsite.com/blog/?p=432 -> http://www.newsite.com/somewhere/else/on/mysite/ and have

Redirect https to http without SSL - IIS 7

自古美人都是妖i 提交于 2019-12-24 19:24:03
问题 I recently moved my website from Wix.com to one that I created on GoDaddy (Windows server). Wix.com version used https, and the latter doesn't. Searching for the website on Google still lists the "https://*" version (which doesn't exist anymore) instead of listing the "http://" version. Question 1: How should I redirect visitors from https to http version without having to set up SSL on the new website? Adding this to web.config didn't help: <rewrite> <rules> <rule name="Redirect to HTTP"

Remove double 301 redirect from my htaccess?

北慕城南 提交于 2019-12-24 16:52:27
问题 I just realized that my htaccess produces double 301 redirect in some cases. For example, if you try to access http://example.com/old_url it will: First 301 to http://www.example.com/old_url (added www) Then 301 to http://www.example.com/new_url (changed to new url) Here's how my htaccess is set up: RewriteEngine On # Add www RewriteCond %{HTTP_HOST} ^example.com [nocase] RewriteRule ^(.*) http://www.example.com/$1 [last,redirect=301] # Do some url rewriting RewriteRule ^new_url_1$ new_url_1

Remove double 301 redirect from my htaccess?

别来无恙 提交于 2019-12-24 16:51:49
问题 I just realized that my htaccess produces double 301 redirect in some cases. For example, if you try to access http://example.com/old_url it will: First 301 to http://www.example.com/old_url (added www) Then 301 to http://www.example.com/new_url (changed to new url) Here's how my htaccess is set up: RewriteEngine On # Add www RewriteCond %{HTTP_HOST} ^example.com [nocase] RewriteRule ^(.*) http://www.example.com/$1 [last,redirect=301] # Do some url rewriting RewriteRule ^new_url_1$ new_url_1

htaccess redirect 301

我与影子孤独终老i 提交于 2019-12-24 06:26:55
问题 Google says that the content is duplicated www.example.com/pagedcontent/page3 / www.example.com/pagedcontent/page3 I redirected using redirect 301 for each page, but as they are already more than 150 pages would like to use a single instruction in the htaccess. How to do? Please I want to redirect to www.example.com/pagedcontent/page3 (without / at end) 回答1: Like this: RewriteEngine On RewriteRule ^pagedcontent/([A-Za-z0-9]*)/$ /pagedcontent/$1 [NC] That will remove the trailing slash for any

htaccess redirect 301

為{幸葍}努か 提交于 2019-12-24 06:26:32
问题 Google says that the content is duplicated www.example.com/pagedcontent/page3 / www.example.com/pagedcontent/page3 I redirected using redirect 301 for each page, but as they are already more than 150 pages would like to use a single instruction in the htaccess. How to do? Please I want to redirect to www.example.com/pagedcontent/page3 (without / at end) 回答1: Like this: RewriteEngine On RewriteRule ^pagedcontent/([A-Za-z0-9]*)/$ /pagedcontent/$1 [NC] That will remove the trailing slash for any