Jump to content

The Ultimate ASP/ASP.net 301 direct/forwarding thread!

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
4 replies to this topic

#1
Dan

Dan

    Programmer

  • Members
  • PipPipPipPip
  • 145 posts
If you don't know what a ASP/ASP.net 301 redirect is, you will by the end of this thread! If you need to redirect a page, unfortunately it isn't as simple as using one of the various methods - only the 301 redirect will preserve search engine rankings for the page. It is the most efficient, search engine friendly method for website redirection - the code 301 is interpreted as "moved permanently".

ASP 301 Redirect Code:

<%@ Language=VBScript %>

<%

Response.Status="301 Moved Permanently" Response.AddHeader "Location", " http://www.new-url.com"

>

ASP.net 301 Redirect Code:

<script runat="server">

private void Page_Load(object sender, System.EventArgs e)

{

Response.Status = "301 Moved Permanently";

Response.AddHeader("Location","http://www.new-url.com");

}

</script>


#2
Guest_NeedHelp_*

Guest_NeedHelp_*
  • Guests
You have to have ASP.NET to use this, correct? Can you get ASP.NET to work in Linux? My server is linux and I know very little about it.

#3
Dan

Dan

    Programmer

  • Members
  • PipPipPipPip
  • 145 posts

NeedHelp said:

You have to have ASP.NET to use this, correct? Can you get ASP.NET to work in Linux? My server is linux and I know very little about it.

I'm not going to say it cannot be done, as that would contradict one of my fav. philosophies "never say never". However, it would be more difficult to get asp (microsoft) to work on a linux server.

I would recommend a PHP 301 redirect, or even a HTML one!

#4
jedik

jedik

    Newbie

  • Members
  • PipPip
  • 13 posts

Dan said:

I'm not going to say it cannot be done, as that would contradict one of my fav. philosophies "never say never". However, it would be more difficult to get asp (microsoft) to work on a linux server.

I would recommend a PHP 301 redirect, or even a HTML one!


I do not think so. If you really want to host a ASP.NET code or snippet in your Linux server just make sure you have the latest .NET framework and the Apache or anyother web server and then configure the ports properly. Thats all.

But ASP codes are less eligible to run on a Linux Server.

And by the way this entire process is going to cost a lot of time. SO it is highly recommended to do a PHP redirect for it.

#5
gokuajmes

gokuajmes

    Programming God

  • Members
  • PipPipPipPipPipPipPip
  • 518 posts
ASP pages do work on Linux , try the .net framework under "Wine"