Forum Moderators: phranque

Message Too Old, No Replies

ASP to Apache redirect

         

jmsrmk

4:03 am on Apr 30, 2010 (gmt 0)

10+ Year Member



I need to redirect a domain name from an ASP server to an Apache server. I'm a php developer and I don't have complete access to the ASP server or the domain to change the DNS servers.

Before I bonked myself when I realized that it was an ASP server, I tried an .htaccess file on the ASP server, but I'm guessing that doesn't work since .htaccess files are only for Apache servers!

Given that I can't get to the IIS server or whatever it is, is there another way to redirect the entire domain name to a different domain name on an Apache server?

I've looked and looked and I see page-by-page redirects...is that my only option? Please say no....

Best Regards,
Julie

g1smd

7:17 am on Apr 30, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



If the server uses IIS there's a place in the control panel to "set a permanent redirection for this domain".

Google those words plus "IIS" for the instructions.

jdMorgan

12:50 pm on Apr 30, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Alternately, if you have access to the DNS server for the old domain and if the new server is an IP-based virtual host on a unique (non-shared) IP address, then you could re-point the old domain to the new server's IP address in the DNS settings, detect requests for the old domain name on the new server, and redirect those requests to the new domain name.

Jim

jmsrmk

4:12 pm on Apr 30, 2010 (gmt 0)

10+ Year Member



Well that's the problem. I don't have access to the IIS server or control panel for that server and I don't have access to the DNS server for the old domain to change the DNS servers.

The domain name and old server are located in Italy and under the control of my clients ex-brother-in-law whom he doesn't like to bother to try and get needed information. I'm lucky I even have ftp access to the old server as it is!

I may have to write out instructions for the ex-brother-in-law on how to change the DNS servers and see if my client can't get him to change the DNS servers to the new domain.

Thanks for all the help so far. Any other ideas?

g1smd

6:56 pm on Apr 30, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



If you have FTP access then you need to be able to introduce an ASP script that does the redirect.

If the server used PHP it would consist of something like:

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


Google for equivalent ASP code.

jmsrmk

8:11 pm on Apr 30, 2010 (gmt 0)

10+ Year Member



Thanks g1smd, I will give that a shot!

jmsrmk

8:21 pm on Apr 30, 2010 (gmt 0)

10+ Year Member



Okay, to get the redirect to work off of the old site, I had to place:

<%@ Language=VBScript %>
<%
' Permanent redirection
Response.Status = "301 Moved Permanently"
Response.AddHeader "Location", "http://www.newname.com/"
Response.End
%>

at the top of the index.asp file.

Now the problem that I have is that the name in the browser shows as [newname.com...] and I'd like it to show as [oldname.com...] Is that possible?

jdMorgan

8:24 pm on Apr 30, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Nope, neither possible, nor desirable.

If you could do it, you'd be creating a duplicate-content situation for yourself -- a problem that causes a lot of anxiety over in our Google forum...

Jim

jmsrmk

8:41 pm on Apr 30, 2010 (gmt 0)

10+ Year Member



Ahh okay Jim. Is that the duplicate content type issue that causes issues with Google page rankings?

jdMorgan

8:54 pm on Apr 30, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



That would be the one...

Having more than one URL that resolves to the same content can be trouble, whether it be multiple domains, http versus https protocol, www- versus non-www hostname, FQDN-format hostname, appended port number on hostname, "/index.php" versus "/", "/index.php?cat=widgets&size=small&color=blue&shape=round&texture=fuzzy" versus "/widgets/small/blue/round/fuzzy", or "/mypage" versus "MyPage" -- Any character different in a URL makes it a different URL, and if a non-canonical URL can be used to directly access the same content without being redirected to the canonical URL, then that is a problem. Good policy: "One page, one single "correct" URL -- all others must 301-redirect to that single URL."

Search engines don't index "sites" or "pages" or "files." They index URLs.

Jim

jmsrmk

11:42 pm on Apr 30, 2010 (gmt 0)

10+ Year Member



Got it Jim and thanks all for the help! I've let my client know their options and I'll wait to see what they want to do!

jdMorgan

11:53 pm on Apr 30, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hopefully, you can carry the flag for "proper" domain and site ownership and administration.

The domain and the site need to be registered and hosted under the name of the corporation, and anything else is a mickey-mouse setup that places them at risk. Server controlled by the brother-in-law... Oh my!

Sometimes the messes that people get themselves into amaze me... :o

Jim