http-status-code-301

ASP .NET 301 redirect create problem for some users

This is the code I use to redirect from www. to non www. version of my site void Application_BeginRequest(object sender, EventArgs e) { string authority = Request.Url.Authority; if (authority.StartsWith("www.")) { authority = authority.Remove(0, 4); string newUrl = "http://" + authority + Request.Url.PathAndQ...

How to implement 301 redirection with PHP/Apache?

When user is visiting by www.domain.name, redirect to domain.name. ...

301 redirect of entire site in Rails

I am going to move my web application to a new domain name and want to use 301 permanent redirect for all incoming traffic to the old domain name. I was going to use a before_filter in the application controller that does a permanent redirect. I was wondering how exactly I would write this to catch all urls and pass them 'as is' to the ...

Django: Why can't I get my development server to work?

I'm on Windows XP with the latest install of Python 2.6 (and the development server has been working up until last night). I have the path and Python path stuff all set up, and my dev server has worked forever. I recently replaced my django-trunk with a new pull from the Django trunk. I thought maybe there was an import error or somethin...

Can I do a 301 redirect in robots.txt?

I have a site which has a whole host of legacy links, which now need to be mapped to new links. We need to update search engine results so that the legacy ones disappear and are replaced. Because of the CMS we can't do this programatically, but I was wondering if we could set up a 301 redirect in the robots.txt file, which would update...

Global 301 redirection from domain to www.domain

Hello, could i use the begin request of Global.asax to redirect everything, from mydomain.domain to www.mydomain.domain? If this one is true, how can i do that? ...

Redirect all page on a domain to one file

Hello, I am looking to permanently redirect all the pages on a domain to one page on the SAME domain, using htaccess/mod_rewrite. Basically I want any page requested for the domain to return a holding page [ which is index.php] at domain.com/ most of my attempts so far are causing errors as they are throwing the server intoa loop. T...

Redirect Dynamic Page to Dynamic Page In Different Folder

My current page is set up like this, where '#' is a number for each user; http://site.com/member.php?u=# I want to move it to a different folder on the same site, how would I set up .htacces so when some goes to the page above, they're automatically redirected to this; http://site.com/new_folder/member.php?u=# I have seen a few tut...

Problem with 301 redirects due to URL rewriting

Hi, I've got a new site setup using CMSMadeSimple (PHP based) but I'm having problems 301 redirecting the old site URLs with the new setup. I'm using a standard .htaccess file for the CMS which translates SEO friendly URLs like http://www.example.com/test.html into http://www.example.com?page=test, but I also need to redirect old URLs ...

How do you do a 301 permanant redirect route in ASP.Net MVC

How do you do a HTTP 301 permanant redirect route in ASP.NET MVC? ...

.htaccess rewrite rule for redirects

I've been fighting this for a while and can't seem to make it work. My old system used a lot of query strings to render pages but they are no longer necessary. My url is below: OLD URL: www.example.com/links.php?section=5&catid=52 NEW URL: www.example.com/mhfs/links The name links is coincidental and not necessarily from the old pa...

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 the problem, which might be occuring. I have to put this page at the root folder, to acc...

Cherokee rule for 301 redirect

I am moving from Apache to Cherokee for some trials I want to do the redirect in cherokee that i do for Apache: # Redirect to the WWW canonical name RewriteEngine On RewriteCond %{HTTP_HOST} !=www.domain.com RewriteRule ^ http://www.domain.com%{REQUEST_URI} [R=301,L] But cant find any explanation on how this is done any help ap...

How do I redirect domain.com to WWW.domain.com under Django?

How do I go about redirecting all requests for domain.com/... to www.domain.com/... with a 301 in a django site? Obviously this can't be done in urls.py because you only get the path part of the URL in there. I can't use mod rewrite in .htaccess, because .htaccess files do nothing under Django (I think). I'm guessing something in midd...

How do I write a 301 redirect taking a portion from the middle of the old url and using it on the end of the new?

I need to redirect my old cart links to the new site's search Here's an example: old url:http://www.example.com/servlet/the-1736/Festo-Line-Acuator-DNC-dsh-100-dsh-150-dsh-PPVA-dsh-Q/Detail what new should look like: www.example.com/cart/index.php?dispatch=search.results&q=Festo-Line-Acuator-DNC-dsh-100-dsh-150-dsh-PPVA-dsh-Q So on m...

URL Rewriting and 301 Redirect... Redirects to the original URL

In answering another persons question here on SO, I discovered that there is a small "bug" in my global redirect code. I have wired up a Global class to an HttpModule. It's job is to detect "http:/www." in the URL and redirect the user to the NON www. version Protected Sub OnBeginRequest(ByVal sender As Object, ByVal e As EventArgs) ...

Is this a correct way of doing a 301 redirect?

When I check my page using those online host header analyzers, the page says 200 OK. But when viewing in my browser, it redirects to another website (which is how I want it to be). The code that I use is: context.Response.Status = "301 Moved Permanently"; context.Response.AddHeader("Location", "http://www.example.com/article" + arti...

Setting up 301 redirects with Dynamic URLs

I'm guessing this is actually an impossible task, but I thought I'd run it by StackOverflow to see if I'm wrong. Basically we have some dynamically created URLs for SEO purposes (around 300,000+ of them) and we want to do 301 redirects to them. Our current URLs look like this: http://www.site.com/&lt;Brand&gt;/&lt;Product Name>/<pr...

301 Redirect with query string and domain name in Apache

I'm trying to write a 301 redirect that will look at both the host name and the query string parameter. So if the URL is either of the two. http://www.example.com/index.php?p=11&amp;b=3 http://example.com/index.php?p=11&amp;b=3 Then I want it to redirect to the appropriate page: http://store.example.com/testpage.html Otherwise, ...

Can't I have more than a certain number of redirects using htaccess?

I've registered 3 domains, all for the same site. I've done this to catch people who can't remember the right URL. So I've got: domain.com.au domain.org domain.org.au The hosting is under #1, with #2 and #3 as parked domains. I want everybody to get directed to #3 (domain.org.au) because it is a site for non-profit charity in Austr...