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
5
votes
2 answers
Multiple 301 Redirects after restyling a website (SEO)
We have updated our site recently; the old one had around 300 pages... the new one about 80 ;)
This because in the old structure we had, for every argument, many pages. Instead, now we have just one page with a 'summary'.
For example, the old…

Strae
- 18,807
- 29
- 92
- 131
5
votes
0 answers
Caching img src that causes redirect
I would like to have the browser cache the response from a redirect.
I am setting the src attribute on an img tag to a url that is a redirect to the final resource. The redirect is only good for a short period of time (e.g. 15 min) but the actual…

Alex Rothberg
- 10,243
- 13
- 60
- 120
5
votes
1 answer
forwarding http to https doesn't work on iOS Safari
I am forwarding my http traffic to https with a .htaccess file like this:
RewriteEngine On
RewriteCond %{HTTPS} !on
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
This works everywhere except on iOS safari. When I go to the http address on…

Atma
- 29,141
- 56
- 198
- 299
5
votes
1 answer
Should I use a 301, 302, or 303 redirect after form submission?
I am creating a simple question-answer message board in php. When someone submits the answer to a question, the php script redirects the user to the original question, with the updated answer at the bottom of the page.
In this case, would it be…

Leo Galleguillos
- 2,429
- 3
- 25
- 43
5
votes
0 answers
Using UrlRewriteFilter to get Tomcat to return a 301 redirect from http to https
I'm trying to find out if anyone has succeeded in using the UrlRewriteFilter
availabe from http://tuckey.org/urlrewrite/ to do a 301 permanent redirect from
http to https in Apache Tomcat but I don't seem to be getting anywhere fast.
A number of…

lyallex
- 51
- 3
5
votes
2 answers
301 Redirect from main domain (www and non-www) to subdomain
I need to redirect from a main domain like mydomain.com or www.mydomain.com to sub.mydomain.com - and this needs to work for all requests, so mydomain.com/whatever goes to sub.mydomain.com/whatever.
I've tried this, which only works for non-www at…

BrynJ
- 8,322
- 14
- 65
- 89
5
votes
2 answers
Mass 301 redirect using .htaccess
I am working on a large project that involves taking thousands (30,000+) static web pages and turning it into to a CMS.
The issue is many of these pages are duplicates within their directories. I want to keep the SEO intact by using 301 redirects,…

michaelcarrano
- 1,316
- 2
- 12
- 19
5
votes
1 answer
Is it OK to HTTP redirect images used in email clients?
I have seen the answers to Is it OK to HTTP redirect images. It is a YES - browsers would follow redirection.
However, do email clients (GMail, Express, Thunderbird, Yahoo...) follow the same rule?

Khanh Hua
- 1,086
- 1
- 14
- 22
5
votes
2 answers
Stop WordPress from 301 redirecting /index.php to /
I need to be able to browse to http://www.example.com/index.php, but WordPress automatically 301 redirects this to http://www.example.com/.
Is it possible to stop this redirection ONLY for the homepage?
Here is my .htaccess file:
# BEGIN…

Shane
- 1,190
- 15
- 28
5
votes
3 answers
Rails redirect_to "www.somewebsite.com" with GET/POST parameters?
I'm trying to issue a redirect_to in one of my controllers to a fully qualified URL + I want to pass in some parameters
In the controller for site A I do:
redirect_to: "www.siteB.com/my_controller/my_action?my_parameter=123"
Is there a nicer way to…

LouisePr
- 51
- 1
- 2
5
votes
2 answers
.htaccess 301 redirect all pages within directory to other domain without querystring
This question probably has been answered, but I cannot seem to find a fitting solution.
I would like to 301 redirect all pages like the ones…

chocolata
- 3,258
- 5
- 31
- 60
5
votes
2 answers
301 Redirect with htaccess and Cache: How to Delete Old Cache?
So after much help and research I've FINALLY been able to get the 301 redirects working via .htaccess file, but I noticed that unless I actually hit 'refresh' on my browser it will not redirect the page due to simply reading the cached site.
I've…
Karl
5
votes
2 answers
Ruby on Rails redirect how to pass params in routes file
We recently changed the product name on our website from 'bracelets' to 'wristbands' and need to keep the old routes around for SEO purposes.
Essentially, these…

ruevaughn
- 1,319
- 1
- 17
- 48
5
votes
1 answer
I can't update Django's RedirectView. It keeps referring to the old URL with a status of 301 Moved Permenantly
Sorry if this question was supposed to be in Server Vault. I couldn't really tell whether it's a programming error or a server configuration error.
I recently pushed my git commits to the live server and I noticed something very frustrating.
No…

hobbes3
- 28,078
- 24
- 87
- 116
4
votes
1 answer
301 redirect vs canonical links?
For technical reasons on a site we may have two or more links that refer to the same product page. For example:
http://example.com/a-nice-product-no1234.html
and:
http://example.com/a-nice-foobar-product-no1234.html
Apparently the first one is the…

Lachezar Balev
- 11,498
- 9
- 49
- 72