|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
|||
|
|||
|
Redirecting without an IP Address
I need to setup a 301 re-direct from:
http://foo.com to http://www.foo.com In everything that I've found so far tells me that I need to create another website through IIS and redirect it from there. The problem is, I don't have an IP address to spare at the moment, so this option doesn't work. Are there any other options to setup a 301 redirect through IIS without creating another website? Any suggestions or help would be greatly appreciated. Thanks, Conor |
|
#2
|
||||
|
||||
|
Why do you need another IP address? You should be able to create a new website with the same IP address but different host header value.
|
|
#3
|
|||
|
|||
|
Quote:
After setting up the site using the host header value, will I be able to create the 301 redirect? The way that I understand it, you will not have that option. I want the 301 redirect for SEO reasons. We don't want to 1) lose the pagerank/authority that http://foo.com has gotten and 2) possibly be penalized for duplicate content by accessing the same content from two different addresses. |
|
#4
|
|||
|
|||
|
An asp response.redirect does a 301 redirect afaik.
__________________
====== Doug G ====== "Hide, hide witch! The good folk come to burn thee. Their keen enjoyment hid behind their gothic mask of duty." -Mark Clifton |
|
#5
|
|||
|
|||
|
I just ran some simple tests to see if I could use PHP to do this redirect, and I don't think this will work either. I tried to redirect the page after determining if they accessed it by www.foo.com or http://foo.com. For some reason, the URL/Server variables always return the www. So it's a no go. I also tried to use Javascript (window.location) and that returned the same thing.
It looks like I'll have to burn an IP address to do this redirect or just forget about it. Any other suggestions are still appreciated. Conor |
|
#6
|
||||
|
||||
|
Quote:
This code should move with a 301 redirect: http://forum.weborum.com/index.php?showtopic=51 |
|
#7
|
|||
|
|||
|
Quote:
Again, this requires a seperate website to be created through IIS, using another IP address, for the sole purpose of re-directing traffic. IIS can provide the 301 redirect without using PHP or other methods - but I was trying to avoid setting up this additional website if possible. It doesn't look like I'll be able to do that, so I'm just going to burn that additional IP address and setup the alternative site. Thank you to all who gave the time to make suggestions. Conor |
|
#8
|
|||
|
|||
|
Code:
<%
Select Case Request.ServerVariables("SERVER_NAME")
Case "foo.com" Response.Redirect "http://www.foo.com"
End Select
%>
I use this code in my index.asp page |
|
#9
|
|||
|
|||
|
Quote:
I finally got around to setting this up yesterday. I used Isapi_rewrite (http://www.isapirewrite.com/) and it works like a charm. For $70, you can setup unlimited sites and other redirects and no need for seperate IP addresses for each site. Conor |
![]() |
| Viewing: Dev Shed Forums > System Administration > IIS > Redirecting without an IP Address |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|