Questions tagged [http-status-code-301]

The 301 or Moved Permanently error message is a HTTP standard response code indicating that the requested resource has been assigned a new permanent URI. Future references should use one of the returned URIs.

1797 questions
7
votes
1 answer

How do you redirect in ColdFusion and control the status code (i.e. 301 instead of a 302)

This code does a redirect, but uses a 302 status code: I found this on the Internet, but I think it only works in ColdFusion8. I am using ColdFusion7.
James Lawruk
  • 30,112
  • 19
  • 130
  • 137
7
votes
1 answer

Internet latency: what do PENDING and FROM CACHE mean in Chrome Developer Tools Network tab

I would like to confirm whether I'm understanding this correctly or not. I'm having severe latency issues when I type "google.com" into the Chrome address bar, but not when I do the same thing in other browsers. I've also downloaded Canary and have…
Tim
  • 8,669
  • 31
  • 105
  • 183
7
votes
1 answer

HTML 301 Redirect in Google App Engine

I have 4 URLs that I would like to redirect to my main page. They are all just common misspellings and I want to have my bases covered so that users can access the site even if they have a letter off. How would I go about doing this with Google…
clifgray
  • 4,313
  • 11
  • 67
  • 116
6
votes
2 answers

Using 301/303/307 redirects for dynamic short urls

We're implementing a short url service where the redirection target will be changing daily. The urls will be accessed by mobile devices and will always be GET requests. I'm trying to understand which is the best 300-type redirect for the job. AFAIK…
Yarin
  • 173,523
  • 149
  • 402
  • 512
6
votes
5 answers

301 redirect index.html to / or /index.php

Greetings, I have just moved a website from IIS to Apache and am having a little trouble redirecting the index file without causing an infinite loop. Both of these individually will cause a loop- Redirect 301 /index.htm /index.php Redirect 301…
Marty
  • 2,606
  • 7
  • 29
  • 35
6
votes
3 answers

What is the more recommended way to 301 redirect in asp.net?

I've googled everything, and I've read a ton of different responses -- some I've tried to implicate with no success. I'm not a professional programmer, but I thank people in this forum for teaching me so much about everything, from jquery to…
6
votes
1 answer

How can i configure in web.config a 301 permanent redirect?

I would love to use web.config to do the 301 redirection from an old domain to another. How could i do that? In your answers, please keep in mind that the IIS is v7 and i would not like to use any 3rd party dll's like urlrewriteing.net etc or use…
OrElse
  • 9,709
  • 39
  • 140
  • 253
6
votes
1 answer

301 response with 'Cross-Origin Request Blocked' despite having correct CORS headers configured

I'm accessing nasa pictures with their public api, but i get this error: Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at [nasa api website] (Reason: CORS header ‘Access-Control-Allow-Origin’…
dedepe
  • 85
  • 1
  • 9
6
votes
7 answers

Express res.status(200).json(...) only sending json message. How to retrieve status code?

After a successful creation of new item in my database I send: res.status(201).json({message:"Successfully Registered"}); On my angular front end I am able to console.log(res) and receive: {message: "Successfully Registered"} 1) How do I get the…
Vincent Nguyen
  • 1,555
  • 4
  • 18
  • 33
6
votes
2 answers

Golang "301 Moved Permanently" if request path contains additional slash

I have been using golang's default http.ServeMux for http route handling. wrap := func(h func(t *MyStruct, w http.ResponseWriter, r *http.Request)) func(http.ResponseWriter, *http.Request) { return func(w http.ResponseWriter, r *http.Request) { …
The Coder
  • 2,562
  • 5
  • 33
  • 62
6
votes
2 answers

Powershell determine new URL of a permanently moved (redirected) resource

I'm using Powershell Core v6-beta.5 using AppImage on Linux. Is there a way to find out the "new" location of a 301 redirect? Invoke-WebRequest -Method HEAD http://SomethingThatThrows301.com/ -MaximumRedirection 0 throws an error (Response status…
0fnt
  • 8,211
  • 9
  • 45
  • 62
6
votes
5 answers

Zend Framework: How to 301 redirect old routes to new custom routes?

I have a large list of old routes that I need to redirect to new routes. I am already defining my custom routes in the Bootstrap: protected function _initRoutes() { $router = Zend_Controller_Front::getInstance()->getRouter(); $oldRoute =…
Andrew
  • 227,796
  • 193
  • 515
  • 708
6
votes
1 answer

Get the referral url in javascript

I want to see how much traffic I get from various URL shortening services like bit.ly tinyurl.com But because they use 301 redirection, they don't show up in my analytics. How can I find out who is redirecting the traffic? Or More precisely how…
Atul
  • 4,463
  • 5
  • 23
  • 19
6
votes
4 answers

How long do I need to maintain old URLs?

Ok, I know it is best practice that once you change or remove a page URL, to redirect that url to the new relevant URL. But for how long? forever? For example, I am using Google website optimizer to test different variations of a page. So I have to…
JD Isaacks
  • 56,088
  • 93
  • 276
  • 422
6
votes
1 answer

Redirect in Internet Explorer 11 to a PDF leads to multiple requests

I 301-redirect a link to track a click. http://myurl.tld/redirect.php?target=http%3A%2F%2Ftarget.tld%2Ffile.pdf I track the amount of calls and some other stats on redirect.php. It works well unless I redirect to a pdf file in Internet Explorer (I…
Horen
  • 11,184
  • 11
  • 71
  • 113