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
How do I implement a redirects-only rack-based heroku application?
I would like to create an rack application for deployment of heroku to create some 301 redirects to other subdomains.
If the path would be carried over, it would be nice.
I started with the following code, but it isn't working:
require…

rriemann
- 528
- 4
- 17
3
votes
2 answers
Isapi Rewrite 301 redirect resolves as 404 - circular reference?
I'm trying to use IIS Isapi Rewrite to do the following...
I need seo-friendly URLs to be (silently) converted back to application friendly URLs like so:
RewriteRule ^/seo-friendly-url/ /test/index.cfm [I,L]
Simple enough.
But I also need URLs…

stubotnik
- 1,952
- 2
- 17
- 31
3
votes
1 answer
Very advanced .htaccess
Okay, I've looked around a bit, and I cannot seem to find the answer.
Now I'm not asking for you to give me just a block of code, and say "this is the fix", I would like for you to explain how you did it, what you came up with, etc. I would really…

David Lawrence
- 659
- 1
- 8
- 15
2
votes
1 answer
PHP code to determine if a user was 301 redirected to my site
Is it possible in PHP to know if a user has been 301 redirected to my website?
So in myoldsite.com I have a 301 redirect in the .htaccess file to mynewsite.com.
Can I place some PHP code in mynewsite.com to recognise when a user has been 301…

michaelmcgurk
- 6,367
- 23
- 94
- 190
2
votes
1 answer
What is the Path In .htaccess 301 Redirect Relative To?
I just redeveloped an existing site from the ground up. The old site used pure HTML while the new site will draw content from a database. Now I need to redirect the old pages to the new URL structure, but I’m a bit confused about how to write the…

Herbert
- 5,698
- 2
- 26
- 34
2
votes
2 answers
Redirection rules with special characters
I want to use redirect 301 rules (i.e. I hope to be able to avoid rewriting rules) to redirect URLs that contain special characters (like é, à ,...) like for instance
redirect 301 /éxàmple http://mydomain.com/example
However, simply adding this…

Jordi Cabot
- 8,058
- 2
- 33
- 39
2
votes
0 answers
IIS7 rewrite rule to another domain?
I have two domains: first.com and second.com.
In these domains there are two ASP.NET applications hosted in IIS 7.
Page in application http://first.com.index references a script which source is http://second.com/script.js
Script is doing some ajax…

jlp
- 9,800
- 16
- 53
- 74
2
votes
2 answers
How do I 301 redirect one domain to the other if the first has a folder path
I want to 301 redirect from: www.olddomain.com to the root of newdomain.com but I want it to work no matter what the folder path is on the old domain. eg: the following should all redirect to the root of…

Matthew James Taylor
- 4,806
- 5
- 29
- 33
2
votes
2 answers
.htaccess for 301 redirect: which syntax is best?
I am permanently redirecting my website
http://www.oldsite.com
to
http://newsite.com/blog
Is there a difference between using
Redirect 301 / http://newsite.com/blog/
or
RewriteEngine On
RewriteRule ^(.*)$ http://newsite.com/blog/$1 [R=301,L]
Any…

pepe
- 9,799
- 25
- 110
- 188
2
votes
3 answers
Is this the best place to use a 301 redirect to control which domain name is used?
I am using ColdFusion 9.0.1
I have a new site that is accessible through a few domains such as:
mydomain.com
www.mydomain.com
foo.mydomain.com
For SEO and tracking purposes, I want to make sure that only "mydomain.com" is indexed and accessed. So,…

Evik James
- 10,335
- 18
- 71
- 122
2
votes
2 answers
IIS 301 Redirect from subfolder to root folder
A customer had their website content in a subfolder on their site e.g. www.customersite.com/content. It has since been moved to the root folder e.g. www.customersite.com
We've added a IIS 301 redirect, to the site config that looks like…

PW763
- 251
- 1
- 6
- 12
2
votes
3 answers
Varnish 301 redirect displays a white page
We use varnish as our load balancer (among other things) but we get some strange behavior at the moment.
We have a script that gets called with some parameters, and depending on what parmas you pass, you get redirected to a different location using…

Stephan
- 1,505
- 1
- 11
- 19
2
votes
2 answers
301 Redirect where 2 domains point to same IP?
I have 2 TLDs example.com and example.ie.
example.com and example.ie both point at the same IP address and pull the same content now we could get whacked with a ban hammer from Google for duplicate content so we want anyone accessing *.example.ie…

Myles Gray
- 8,711
- 7
- 48
- 70
2
votes
1 answer
HTACCESS 301 : How to redirect all urls to HTTPS except spammy urls with a specific character?
I posted a question one month ago with great answers (HTACCESS 403 : How to block URL with a specific character?) : HTACCESS 403 : How to block url with a specific character?
The problem is, I migrated my website HTTP to HTTPS and I would like to…

Arnaud
- 35
- 5
2
votes
2 answers
Nextjs - change permanent redirect status code from 308 to 301
I'm using next.config in order to redirect non www requests.
redirects: async () => [
{
source: '/:path*',
has: [{ type: 'host', value: 'example.com' }],
destination: 'https://www.example.com'/:path*',
permanent: true,
},
]
Now as you…

Tomer Avraham
- 64
- 9