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.
Questions tagged [http-status-code-301]
1797 questions
3
votes
4 answers
Avoid infinite loop with 301 redirects
I'm using .htaccess to redirect
http://www.example.com/foo/
to
http://www.example.com/foo/bar
This is my code:
redirect 301 /foo/ http://www.example.com/foo/bar
However this produces a feedback loop, something like…

GluePear
- 7,244
- 20
- 67
- 120
3
votes
5 answers
SEO redirects for removed pages
Apologies if SO is not the right place for this, but there are 700+ other SEO questions on here.
I'm a senior developer for a travel site with 12k+ pages. We completely redeveloped the site and relaunched in January, and with the volatile nature of…

Adam Hopkinson
- 28,281
- 7
- 65
- 99
3
votes
1 answer
Redirect rule in .htaccess is taking me to the wrong place
I'm having trouble with redirecting urls using the .htaccess file. This is what my .htaccess file looks like:
Redirect 301 /file-name/example.php http://www.mysite.com/file-name/example-001.php
Redirect 301 /section-name/example.php…

ocergynohtna
- 1,703
- 2
- 21
- 29
3
votes
4 answers
Spring + Tiles. How to return 301 redirect (instead of 302) in Controller
I am using the code like:
@RequestMapping(value="/oldPath")
public String doProductOld(
@PathVariable(value = "oldProductId") Long oldProductId,
Model model
) throws Exception {
Product product = productDao.findByOldId(oldProductId);
…

Escander
- 256
- 3
- 19
3
votes
3 answers
SEO: Duplicated URLs with and without dash "/" and ASP.NET MVC
after reading this article "Slash or not to slash" (link: http://googlewebmastercentral.blogspot.com/2010/04/to-slash-or-not-to-slash.html) on Google Webmaster Central Blog (the oficial one) I decided to test my ASP.NET MVC app.
For…

Guillermo Guerini
- 997
- 2
- 12
- 22
3
votes
1 answer
301 redirect vs parking
I have several domain names registered, each a slight variant of each other.
E.g,
fastcar.com
fast-car.com
fastcar.co.uk
fast-car.co.uk
etc..
I don't wish to be penalized for duplicate content or spammy links by any of the major search…

Pat
- 129
- 1
- 8
3
votes
1 answer
Apache mod_rewrite redirects to http with 302 instead of https
In apache 2.2 I am using mod_rewrite and I have a rewrite rule as -
RewriteCond %{REQUEST_URI} ^/?mysite/?
RewriteRule (.*)mysite/(.*) $1$2 [R=301,L]
This rewrites this url -
https://www.domain.com/mysite/about/
to…

Nikunj Sharma
- 53
- 1
- 1
- 6
3
votes
3 answers
Does Response.RedirectPermanent(); process code after it is called
I have the following code which checks an exception and if it is a 404 exception, it will check a list of urls to see if the page has been moved and if it matches, will issue a permanent redirect to the new page:
protected void…

Pete
- 57,112
- 28
- 117
- 166
3
votes
1 answer
.htaccess 301 redirect without GET var
For a website I'm currently working on we're redirecting our old URL's permanently to new ones like this:
Redirect 301 /oldfile.php http://www.site.com/show/newurl
Now I come across this situation in which the old url has a get var like:
Redirect…

tvgemert
- 1,436
- 3
- 25
- 50
3
votes
1 answer
Htaccess rule giving 301 error
I am trying to change a URL, in my htaccess I have added this line:
RewriteRule ^/about/$ /site/about_us/
After adding this, if I hit my URL http://mydomain.com/about/ it gives me 301 moved permanently and redirects to…

Disha
- 776
- 9
- 19
3
votes
1 answer
301 redirect to new page keep query string
I want to do a 301 redirect from old_page.php to new_page.php and keep all query strings if they exist.
so old_page.php would redirect to new_page.php
old_page.php?test=1 would redirect to new_page.php?test=1
Here is what I have below, but it's a…

Don Sevcik
- 915
- 1
- 8
- 23
3
votes
1 answer
HttpClient ignores AllowAutoRedirect directive
I'm trying to perform some HEAD checks using System.Net.Http.HttpClient. It works great on everything except 301 redirects. In that case, HttpClient says the status 200, even though the server said 301 and gave a new Location.
Here's a quick test to…

Bex
- 573
- 2
- 6
- 16
3
votes
2 answers
301 Redirect in asp.net
I have just uploaded a new website www.tapasya.co.in. When I tried to access, it showing me a blank page.
But when I tried using the complete path of the home page http://www.tapasya.co.in/Web%20Pages/Home.aspx , its working.
I think, I have figured…

Vaibhav Jain
- 33,887
- 46
- 110
- 163
3
votes
1 answer
htaccess 301 redirect entire directory
After migrating ta large static site to wordpress (as well as a reconstruction), I have a permalink structure that differs from the original directory structure, yet the new post slugs are the same as the original filenames. It's also worth…

psorensen
- 809
- 4
- 17
- 33
3
votes
0 answers
301 Redirect in Web.Config not working
I am organising my 301 redirect from the web.config. Quite simply the page concerned 'enquiries/callabck.aspx' is not redirecting to 'enquiries/customer-service.aspx'.
I've looking around for a few hours. I wondered if you anybody has any ideas for…

wilsonlego
- 97
- 1
- 2
- 15