http-status-code-301

How best to redirect a webpage without using Javascript?

I have some script in my default page that redirects users to language specific versions of my website depending on the language of the browser. I want to add something that redirects those users who do NOT have Javascript enabled. Currently I have the following : <noscript> <META HTTP-EQUIV=REFRESH CONTENT="1; URL=en/index.htm">. </...

301 redirect index.html to / or /index.php

Greetings, I have just moved a website from IIS to Apache and am having a little trouble redirecting the index file without causing an infinite loop. Both of these individually will cause a loop- Redirect 301 /index.htm /index.php Redirect 301 /index.htm http://www.foo.com/ Below is a copy of my current .htaccess. Can someone help ...

using .htaccess for REST does 301 redirect

I'm trying to build an extremely simple RESTful test rig for an app I'm working on. I'm using .htaccess to redirect urls to my controller script where I will parse the urls to handle the logic. I have the redirect working, but the problem is that if I do a POST/PUT/DELETE, Firebug shows my requests going to the test rig properly, but I...

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 newdomain.com www.olddomain.com olddomain.com www.olddomain.com/folder/file.php olddomain.com/folder/file.php How can I do that with...

What's the best way to issue a 301 redirect in this situation?

Hi all, I have a PHP5/Zend Framework 1.8.1 web site which is located at: http://www.example.com/foo The older version of this site, which infuriatingly, is still maintained by google's index was located at: http://www.example.com/foo/DEFAULT.ASP So a lot of people are requesting the above link and hitting a dead end. I figure, th...

301 Redirect directly in HTML file

I have changed some file names on my web and now I want to make "301 Permanently Moved" redirect from the old files to the new ones. The problem is that my web is made completelly by static html pages and all 301 redirect tutorials decribe how to do it in PHP, ASP, htaccess etc. I would like to write the redirect directly into the old h...

Redirect 301 Transfer to New Domain Output URL is Ugly

I am moving my blog to a new domain. I am trying to do this through .htaccess. While the redirect is okay - the output URL is 'ugly' example in old domain .htaccess file: redirect 301 /archives/2009/06/02/hello-world/ http://indiapoint.net/archives/2009/06/02/hello-world/ So if we click http://www.i3pep.org/archives/2009/06/02/hello...

Do WCF REST services support HTTP 301 redirects?

Is it possible to implement a HTTP 301 redirect for a WCF REST Service so that URLs of the form: http://server/customers/?name=John redirects to http://server/customers/324 (For the client-side case of this question, see Does the WCF REST WebChannelFactory client support REST services that use redirects?) ...

Redirect 301 www.www.example.com

I'm using LAMP server, and I need to redirect requests like: www.www.example.com to www.example.com and other variations like (wwww.example.com, etc) I know I can do it in .htaccess, but I don't know the regular expression that I should use to represent all these possibilities. Or there is any diferent approach, comming from the vhost...

Isapi Rewrite 301 redirect resolves as 404 - circular reference?

Hi, 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 already indexed in search engines (for example) to be 301 redirected to the seo-frien...

redirect 301 question

Hi! We just switched to our new website redesign. We have a copy of the previous one in a folder "v1" and the new one is in "v2". I play with 2 .htaccess files. The file are organised as such: root L .htaccess (1) L v1 L v2 L .htaccess (2) .htaccess 1 does 2 things: remove the www out of the URI redirects all requests to v2/...

SEO friendly 301 redirect .htm to .aspx

I currently have a small-midsize website with .htm extensions. I have redesigned the full website, this time using a .aspx extension. I want to issue 301 redirects to keep my search engine rankings, but am unsure of how to do so from an .html page in a spider friendly way. With research I have repeatedly encountered references to ISAPI r...

How can I send a 301 Permanent Redirect with ASP.NET ?

I need to permanent redirect some pages, and redirect the user to the new URL as well. This code only sets the correct headers. The user are not redirected. public static void PermanentRedirect(this HttpResponse response, string newUrl) { response.Status = "301 Moved Permanently"; response.StatusCode = 301; response.AddHeader("Lo...

Help with 301 redirects on outgoing links from my site

I work for company that links out to partners through a third party website that tracks them. So for example on our site there will be an outgoing link something like this (names changed to protect my work): <a href="link.php?link=chuckecheese">check it out kids!</a> if you go into link.php, you see I define the link there: $outlink...

301 redirect and SEO

I am using a link on my site name "sign_up". When you click on sign it, it checks what language you have selected and what curreny, and permanently redirects you to the correct page using a 301 redirect. Is this bad for SEO? Keep in mind, this is the way it will remain. I'm not eventually going to get rid of it? ...

php to htaccess rewrite - redirect if no $_POST data

if( count( $_POST ) < 1 ) { // determine if this was a secure request - we use a non standard HTTPS port so the SERVER_HTTPS_PORT define should always be used in place of 443 $protocol = $_SERVER['SERVER_PORT'] == SERVER_HTTPS_PORT ? 'https' : 'http'; header( "HTTP/1.0 301 Moved Permanently" ); header( "Status: 301" ); /...

htaccess redirect for subdomains -> similarly-named subdirectories?

I'm restructuring a web site with a great deal of content currently parked at URLs that look like this. http://string.domain.com/year/month/dd/string-pulled-from-title For various reasons, I'd like to park all new content at URLs that looks like this http://www.domain.com/blogs/string/year/month/dd/string-pulled-from-title I'd like t...

Redirecting Old Urls After Web Site Overhaul

We have a website which we recently migrated to ASP.NET MVC. All of the URLs are now different from the original website. Google still has all of our old URLs, so if anyone finds us in a search, currently they will get a 404. I have a catchall route that catches bad URLs, including all of the old ones. In a perfect world I would like...

Canonical name redirects in Godaddy?

I have a website "mywebsite.com" and I would like to do a 301 redirect of "http://mywebsite.com" to "http://www.mywebsite.com" (for the usual SEO purposes). I am running IIS7, however there is an ISA server firewall in front of the site, which seems (as per this article, though his solution did not work for me -- http://mrvirtual.de/200...

.htaccess redirect without changing address bar

I'm trying to write an .htaccess rule to redirect to a script, which further redirects somewhere else. Kind of like how URL shorteners work. However, I don't want the address bar to change during the .htaccess part of the redirect. (It's okay for the script redirect to change the location.) I'm using mod_rewrite, currently doing this: ...