301 Redirect on page code
301 Redirect
301 redirection and the Search Engines. It’s really not that hard to implement and it should help your search engine rankings when move sites or pages that where listed in the search engine
The Search Engines see the “301″ Has “moved permanently”.
301 Redirect in ColdFusion
<.cfheader statuscode="301" statustext="Moved permanently">
<.cfheader name="Location" value="http://www.new-site.com">
301 Redirect in PHP
<?php
Header( "HTTP/1.1 301 Moved Permanently" );
Header( "Location: http://www.new-site.com" );
?>
301 Redirect in ASP
<%@ Language=VBScript %>
<%
Response.Status="301 Moved Permanently"
Response.AddHeader "Location", " http://www.new-site.com"
>
301 Redirect in ASP .NET
<script runat="server">
private void Page_Load(object sender, System.EventArgs e)
{
Response.Status = "301 Moved Permanently";
Response.AddHeader("Location","http://www.new-site.com");
}
</script>
hope thats helps
DaveN





Ugly Dog 2706 days ago
http://www.barkslope.comI have a Yahoo store, I assume that this means that I can’t do a 301 redirect with Yahoo? Those Bastards..
Can I run my own executables on Yahoo! Web Hosting?
No, Yahoo! Web Hosting does not allow you to run your own executable files on our servers. You can, of course, execute your PHP scripts. You do not need to change permissions on your scripts to make them executable: They’re recognized as PHP scripts by the file extension .php.
Jaan Kanellis 2706 days ago
http://www.jaankanellis.comYou might find useful:
301 Redirects And Domains With And Without WWW
How to set up a 301 redirect on IIS, non-www domain name to www domain name
claus 2701 days ago
http://clsc.netNice one Dave
Especially the ASP and ASP-dot-net ones are frequently sought after.
Anyway, the reason I’m dropping this line is to add that you specifically shouldn’t just use a “response.redirect” in ASP. I hear that it’s pretty common, but unfortunately it returns a 302 and not a 301.
Oh, and McAnerin got the Perl flavour as well.
Bidera 2696 days ago
http://www.bidera.comGood basic info there. Some people still do use Perl, you know.
/found this through threadwatch
Rob 2693 days ago
For Perl you just put this before your \r\n\r\n
Location: http://www.domain.com/redirect/to/this/page.html
Suchmaschinenmarketing - Suchmaschinenoptimierung by A2D 2425 days ago
http://www.art2digital.com/for .htaccess they wrote nothing?
earnest 2168 days ago
http://huntsvillepr.comPLEASE HELP!!
I would like to permanently move
http://huntsvillepr.com/links/index.php?category=Dentists
to this
http://huntsvillepr.com/dir/dentists.php
and
http://huntsvillepr.com/links/index.php?category=Accounting+%26+Taxes
to this
http://huntsvillepr.com/dir/accounting.php
What are the exact 301 .htaccess code that i should use
Wilhelm912 1767 days ago
http://www.highfashionhome.comSo currently I have my website built on asp. I’m confused whether it is possible to redirect a few of my asp pages to my new Yahoo store.
SNVC 1738 days ago
http://sn.vcThis is definitely a good guide. Thanks for this.