http-status-code-301

Avoiding 301 redirect caching

允我心安 提交于 2019-11-30 01:15:18
问题 This is a follow up question to Using 301/303/307 redirects for dynamic short urls, where I try to determine the best method for implementing short url redirection when the destination url will change on a frequent basis. While it seems that 301 and 307 redirects both perform the same way, the issue that concerns me is 301 redirect caching (as documented here)- is the best way to avoid this to use 307 redirects instead (I'm assuming 307 redirects will never cache?), or to explicitly send a no

How long does Chrome remember a 301 redirect?

会有一股神秘感。 提交于 2019-11-30 00:19:51
I have a new author site that I want to make available from a domain that I had previously used Apache rewriting to bounce traffic to my Amazon site, [R=301,L], which I want to serve up as my own site. I also have a new domain for the interim at least. Is there (are there) particular durations of times when Chrome in particular will store 301 cached redirects? Some other questions, How long do browsers cache HTTP 301s? and How is 301 redirect implemented by different browsers? , ask, and the answer is given that some browsers do not cache, some cache for the session, and Chrome and IE10 cache

How to do a non-cached 301 redirect?

孤街浪徒 提交于 2019-11-29 18:31:51
问题 A while ago all browsers changed their behaviour and started caching 301 redirects, I would like to know how to do a 301 redirect that is not cached in php? 回答1: 301 is a permanent redirect, so caching makes sense. If your redirect isn't permanent, use 307 (temporary redirect), 302 (found) or 303 (see other). See here for the appropriate use cases. To elaborate on the differences between these three: 307 is the generic, temporary redirect for when a resource is moved. For example, a URL like

Mass 301 redirects in ASP.NET, including pages that need to redirect to a different place depending on the query string parameters

徘徊边缘 提交于 2019-11-29 15:43:54
问题 We have several pages of our site indexed using old non-SEO friendly URLS such as http://www.domain.com/DocumentDetails.aspx?id=555. Recently we implemented routing that uses slugs stored in the database and looks up the slug to forward you to the right page using routing, for example: http://www.domain.com/Documents/Title-of-the-Document This is all well and good however we are having a hard time finding the best way to set up our 301 permanent redirects for all the links currently indexed

nginx keep port number when 301 redirecting

喜夏-厌秋 提交于 2019-11-29 14:00:10
问题 I'm trying to collapse a second brand of a web app into the first brand and use 301 redirects to redirect any lingering traffic. The server is running in a Vagrant box forwarding on port 8001. I would like to have: Instead of https://local-dev-url:8001/foo/(anything) 301 to https://local-dev-url:8001/(anything) Instead of https://local-dev-url:8001/adminfoo/(anything) 301 to https://local-dev-url:8001/admin/(anything) . Here's what I have: location ~ /foo/?(.*)$ { return 301 $1/; } location ~

PHP Page redirect problem - Cannot modify header information [duplicate]

喜夏-厌秋 提交于 2019-11-29 11:52:13
问题 This question already has an answer here: How to fix “Headers already sent” error in PHP 11 answers Reference - What does this error mean in PHP? 34 answers I have a page that displays various elements even if the id it's calling from the database does not exist or was deleted (which throws up all sorts of ugly errors along with search engines continuing to list non-existent pages). Can you modify the first part of the page code shown below to send a 404 (or at least to projecterror.php which

Remove Old Permalinks?

依然范特西╮ 提交于 2019-11-29 11:30:44
I have a Wordpress website. I have changed my permalinks several times. All past versions of the permalinks I used are still working. If I type them into the URL bar, I am taken to the page WITHOUT the URL changing/redirecting to the new/current permalink. Why aren't the old permalinks redirecting to the new one? This is causing issues with Google reading duplicate content. Example: .com/lightbulb .com/shop/lightbulb The second URL is old, but still works when I type it in. Shouldn't it redirect to the new one? How can I remove old permalinks from being found by Google?. Thanks in advance As

htaccess redirect url with parameters

对着背影说爱祢 提交于 2019-11-29 11:04:29
I have hundreds of links like this: http://www.domain.com/index.php?tag=value I want to redirect all links to http://www.domain.com/value/ Example: Link1 http://www.domain.com/index.php?tag=LW1fdX49tR redirect to: http://www.domain.com/LW1fdX49tR/ Link2 http://www.domain.com/index.php?tag=A3kh0QLIrc redirect to: http://www.domain.com/A3kh0QLIrc/ Link3 http://www.domain.com/index.php?tag=vXwNR4U9qY redirect to: http://www.domain.com/vXwNR4U9qY/ etc How can I do that? Thank you! Besides redirecting the request, you probably want to make sure the new url actually works too. You'll need both an

SEO and 301 redirects - Can they have relative paths or must they be absolute?

狂风中的少年 提交于 2019-11-29 10:26:10
SEO and 301 redirects - Can they have relative paths or must they be absolute? When doing a 301 redirect for a page, are the BOTs/Spiders going to treat a 301 that goes to a relative path (redirect="../") the same as one that goes to an absolute path (redirect="http://www.somewebsite.com/apage/"). For example I have a parent page with content ( http://www.somewebsite.com/apage/ ) on it... I have a subpage ( http://www.somewebsite.com/apage/more-details ) with further content on it. I plan to move the further content into the main page itself and get rid of the ( http://www.somewebsite.com

301 Redirect one domain to another using web.config

浪尽此生 提交于 2019-11-29 06:07:48
问题 I have multiple domains pointing to one hosting location. I wish to establish one of the domains as my main domain and therefore I wish to perform a 301 redirect to this main domain whenever a user accesses my site from a secondary domain. For example: www.example.com This is my main domain. I want all other domains associated with my site to redirect to here. If a user comes in on: www.test.com or www.test.com/anypage etc. Then I want the user to be redirected to the example version of that