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
11
votes
2 answers

How to make https requests in symfony2 functional test?

Hi i am using phpunit for testing and Symfony\Bundle\FrameworkBundle\Test\WebTestCase for unit testing. So far there were no problem but now we start to use https and my tests are not working anymore.I start to get 301 response code for my every…
Omer Temel
  • 804
  • 1
  • 7
  • 18
10
votes
3 answers

jQuery Mobile 301 Redirect Issues

I am using jQuery 1.6.4 with jQuery Mobile 1.0.1. I am running into an issue anytime you link to a page that then tries to do a 301 redirect. I've setup a sample page at: http://www.widgetsandburritos.com/jquery-mobile-test/ The only thing on this…
David Stinemetze
  • 8,830
  • 3
  • 21
  • 34
10
votes
2 answers

What is causing this 301 redirect?

I have a problem with my server redirecting http://www.mylesgray.com:8080/ -> http://www.mylesgray.com/. Here are my Nginx default and fastcgi_params config files: https://gist.github.com/1745271 https://gist.github.com/1745313 This is rather a…
Myles Gray
  • 8,711
  • 7
  • 48
  • 70
10
votes
1 answer

URL redirection in Java return 302 instead of 301

I'm using this code to redirect url: response.setStatus(HttpServletResponse.SC_MOVED_PERMANENTLY); response.sendRedirect(newURL); what I can see is a correct redirection but the value returned in the response is 302 instead of 301. How can I…
Randomize
  • 8,651
  • 18
  • 78
  • 133
10
votes
2 answers

HTTP Status-code for empty response and response not found

We are implementing a REST based web service and we have some queries on some of the use cases. Consider there is a unique account which contains some information (Ex. added to cart information) What response code should we return if no cart…
10
votes
3 answers

301 redirect .htaccess

How do I 301 redirect, for example: a subdirectory /Blog/ to /blog/ with .htaccess?
Wesley
  • 101
  • 1
  • 3
10
votes
1 answer

CURL is not following 301 Redirects, what do I need to do?

I am using the CURL c++ api to get quotes from Yahoo's financial API. The curl api and my code seem to be working fine, however I am getting a "301" redirect message when I tell CURL to visit the url I want. How can I get CURL to follow through to…
Kladskull
  • 10,332
  • 20
  • 69
  • 111
10
votes
6 answers

How to test an HTTP 301 redirect?

How can one easily test HTTP return codes, like, say, a 301 redirect? For example, if I want to "see what's going on", I can use telnet to do something like this: ... $ telnet nytimes.com 80 Trying 199.239.136.200... Connected to…
NoozNooz42
  • 4,238
  • 6
  • 33
  • 53
10
votes
2 answers

Case-insensitive htaccess 301

I have about 300 redirects in the following format Redirect 301 /post/My-Blog-Post.aspx https://www.example.com/blog/a-new-post/ That works great except the redirects are case sensitive and going to /post/my-blog-post.aspx doesn't redirect. There…
developdaly
  • 1,373
  • 3
  • 16
  • 26
10
votes
1 answer

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

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…
fighella
  • 580
  • 5
  • 16
10
votes
3 answers

How to 301 redirect all pages to the same pages on new domain

I'm moving my site from old-domain.com to new-domain.com with exactly the same pages, e.g., if old-domain.com has a page1.html (i.e., old-domain.com/page1.html) then the new domain has the same page, i.e., new-domain.com/page1.html I tried this in…
Christopher Skyi
  • 229
  • 1
  • 3
  • 12
9
votes
5 answers

Asp.Net MVC 301 Redirects

We used to use ISAPI Re-Write (Infact its still on our server) although it doesnt work with ASP.Net MVC (Somthing to do with 'euxd' get param). We need a relaiable way to implement simple 301 redirects, when we change the site structure, upload a…
LiamB
  • 18,243
  • 19
  • 75
  • 116
9
votes
5 answers

How to use meta refresh to an Ajax based URL?

I'm trying to relocate a few select posts from my blogger URL to my new blog located in a Wix website. I'm trying to use the meta refresh tag to get my SEO transfered for each of my blogger posts. Blogger does not provide 301 redirects outside of…
John
  • 167
  • 8
8
votes
2 answers

C# HttpWebRequest - How to determine if HTTP 301 Occured?

I'm doing some testing of my HTTP 301 redirects (moved permanently) for an ASP.NET MVC web application. I've created a test page with the following code: try { var req = (HttpWebRequest) WebRequest.Create(url); resp = (HttpWebResponse)…
RPM1984
  • 72,246
  • 58
  • 225
  • 350
8
votes
2 answers

curl returning 301 error after migrating to https

We recently migrated to SSL, and the site works great with the exception of one function. The function uses curl in the code below to execute an api located on the same server. The url variable for this function…
HamletHub
  • 481
  • 1
  • 9
  • 19