Jump to content

Welcome to Geeks to Go - Register now for FREE

Geeks To Go is a helpful hub, where thousands of volunteer geeks quickly serve friendly answers and support. Check out the forums and get free advice from the experts. Register now to gain access to all of our features, it's FREE and only takes one minute. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more.

Create Account How it Works
Photo

301 code


  • Please log in to reply

#1
fewblue

fewblue

    New Member

  • Member
  • Pip
  • 3 posts
Hi there,

Probably one unusual question:

I have made new aspx website (based on dnn) and I am hosting it on windows shared hosting plan on go daddy, all that site is completely under mysite/new folder.

However, I had there (in the root) previously htm site with 100 or so htm pages for years now with quite a good google rating.

So, now I have the problem how to point all old htm pages to new ones without losing the rating.

I have check all the 301 codes on line, but all of them actually are little bit more “complicated” for what I am looking for...

Please is there any code that I can simple put in the head of existing htm pages (which will have the function of 301 code) and redirect these pages to new aspx pages (which will of course contain the text from htm pages).

So, just to put is simple: how to use 301 code for mysite.com/oldpage10.htm to mysite.com/new/newpage10.aspx

Thank you for advice.

Sara
  • 0

Advertisements


#2
Major Payne

Major Payne

    Retired Staff

  • Retired Staff
  • 5,307 posts
Can just use the following between the head tags:

<meta http-equiv="Refresh" content="0; url=http://Domain_Name/newpage10.aspx">

Just remember all your old pages will have to remain online for as long as you use this. There is no delay between this "redirect" as shown since you didn't specify that you want visitor's to be notified and give time to read same before being whisked off to new page.

Edited by Major Payne, 19 October 2008 - 05:58 AM.

  • 0

#3
fewblue

fewblue

    New Member

  • Topic Starter
  • Member
  • Pip
  • 3 posts
Thank you Major Payne,

I know for that code well, but I was reading online that the tag does not same function as 301 – please, is that correct as I am not sure? (I mean in the sense of keeping the google rating same)

After quite a lot of time spent searching for the code, I was prepared to use the one you have posted – it seems the logical solution for the problem, but I always prefer to double check with someone much more clever than me.

Thank you. Sara

Edited by fewblue, 19 October 2008 - 06:06 AM.

  • 0

#4
Major Payne

Major Payne

    Retired Staff

  • Retired Staff
  • 5,307 posts
Do you have a Control Panel? If so, your Control Panel has a 301 Redirect Tool which will write the code to your .htaccess file. This may or may not work for you:

ASP:

<%@ Language=VBScript %>
<%
Response.Status="301 Moved Permanently"
Response.AddHeader "Location", "http://www.example.com"
%>

PHP for those that want to try it:

<?php
	header("HTTP/1.1 301 Moved Permanently");
	header("Location: http://www.example.com/");
?>

Is this also you posting
?

Edited by Major Payne, 19 October 2008 - 07:12 AM.

  • 0

#5
fewblue

fewblue

    New Member

  • Topic Starter
  • Member
  • Pip
  • 3 posts
Hi Major,

Thank you for reply – and, yes, that was my post as well.

That is the problem – as your answer point to asp and php (I know that codes as well, as I have used them on asp and php sites) – but my pages are htm one...

So, I didn’t find any better solution than using meta tag, which is your first answer (by using http-equiv="Refresh" content="0) – I have of course tested this, and although the page is naturally redirected where I wanted it to, I am loosing the rating on the new page... hmmm, I cannot believe that there is no ANY article about this in the net (or I am completely missing something here?!)

Thank you. Sara
  • 0






Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP