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
2
votes
0 answers
NGINX + 301 Return for my CDN
I have a redirect on my server running so that all my traffic redirects to https shown here:
server {
listen 80;
server_name example.com www.example.com;
return 301…

mougwi
- 21
- 1
2
votes
1 answer
IIS7 or .Net 301 Redirects from 1 domain to another
I have 2 domains. For the question, I will call them www.old.com and www.new.com. Both urls are pointing to the same IIS7 Site instance. I need to it up so that when someone goes to www.old.com they get a 301 redirect to www.new.com.
The tricky…

Ben Hoffman
- 8,149
- 8
- 44
- 71
2
votes
1 answer
301 Redirect Remove first directory
I have a couple of urls I would like to remove the entire directoy section from a url. What would the htaccess 301 redirect be? Can someone…

ivias
- 249
- 1
- 3
- 15
2
votes
1 answer
301 redirect whithout append paramenter
RedirectPermanent /forum-old-f48.html /forum-neu-f1.html
301 Result:
forum-neu-f1.html?f=48&start=
Target: Dont append the "?f=48&start=" part. How can I make a stop behind the html?
The result should look like this:
forum-neu-f1.html
thank you!

labu77
- 605
- 1
- 9
- 30
2
votes
1 answer
Replace underscores to hyphens before triggering 301
I want to replace all hyphens inside of an URL before permanent 301 redirection. For example this: http://www.example.com/article_category/article_name
to this: http://www.example.com/article-category/article-name
My .htaccess file looks like…

geter712
- 31
- 3
2
votes
0 answers
Is :secure_url necessary in opengraph meta tag if all site resources behind https?
My site and all it resourced serving with https, nginx redirect all http request to https.
When using OpenGraph meta, do I need to duplicate all resources with :secure_url?
For example,

Klimashkin
- 580
- 7
- 18
2
votes
1 answer
Need to redirect a domain to another domain without affecting email
we have 2 domains setup example.co.in and another example.com. Email MX records are pointed to example.co.in domain. As of now example.co.in has our app. I want to redirect application URL example.co.in to example.com. Only Domain need to be…

mbdvg
- 2,614
- 3
- 21
- 39
2
votes
1 answer
Properly 301 redirect an URL with parameters to a different site
Right now I have an outdated URL that is getting 404'd:
http://mysite.com/category/?tag=blue-example
It needs to be redirected to:
http://subdomain.mysite.com/blue/
This doesn't work:
Redirect 301 /category/?tag=blue-example…

m1755
- 175
- 4
- 11
2
votes
1 answer
setting up 301 redirects: dynamic urls to static urls
We are currently using a template-based website and are hoping to move to a site with static urls. Our domain will stay the same. I understand that using 301 redirects in a .htaccess file is the preferred method -- and the one that has the highest…

MS.
- 21
- 1
2
votes
1 answer
htaccess mod rewrite not redirecting automatically
I have the below code in my htaccess file:
RewriteCond %{REQUEST_URI} !\.(gif|css|png|js|jpg|jpeg|html)$ [NC]
RewriteCond %{REQUEST_URI} !(\.gif|\.jpg|\.png)$ [NC]
RewriteRule ^deals/(.+)/(.+)/$ deals.php?make=$1&model=$2 [L,QSA]
This means I have…

Will
- 35
- 2
2
votes
2 answers
Ajax call return 301 permanently moved suddenly
The below code snippet was working fine, but it stopped all of a sudden for no apparent reason
jQuery.ajax({
url: "http://example.com/api/getstuff.php?Location="+location+"&token="+token,
type: 'GET',
…

Digital fortress
- 737
- 8
- 18
- 31
2
votes
1 answer
Response.Redirect Interception
We are using a CMS application developed in asp.net 4 with URL rewrite extension. Our application is hosting thousands of CMS pages and in solution Response.Redirect has been numerously used with URLs containing UPPER CASE letters.
On using URL…

Mohtisham Zubair
- 84
- 7
2
votes
1 answer
IIS7 301 Redirect from a List of URLs
Recent changes are forcing me to add a bunch of 301 redirects. Seems that IIS7 is my best bet as compared to redirects within the files.
I have found how to add them 1 by 1 but this requires the page/folder to exist (which most don't anymore(and…

corymathews
- 12,289
- 14
- 57
- 77
2
votes
1 answer
How can I use mod_rewrite to redirect children pages/directories to a parent directory?
So I have a whole series of redirects in place for a bunch of pages I want redirected to their parent directory (e.g. /faq/question1/ -> /faq/), but it's very inflexible, as they're manually generated.
How can I set up a RegEx-fueled RewriteRule for…

jeffbyrnes
- 2,182
- 2
- 22
- 33
2
votes
1 answer
.htaccess 301 Redirect Folder and Subfolders
I would like to redirect a parent folder to a different place than it's subfolders. When I use the code below /cat1/page_title redirects to /new-cat-1/page_title, instead of /new-global-cat/page-title.
Redirect 301 /cat1 /new-cat-1
Redirect 301…

Mark Rummel
- 2,920
- 10
- 37
- 52