Hi,
I have some code at the top of each page that redirects non-www to www, checked that with a couple of header status checkers and it works. But I now have a problem with an [login to view URL] showing up in googles index instead of [login to view URL] I am not an ASP programer so I am a little concerned that maybe the code doing the non-www to www redirect I was provided with is causing the problem.
Here is the code
<%
dim hostname
dim pathinfo
dim bRedirect
dim MainDomain
hostname = [login to view URL]("HTTP_HOST")
pathinfo = [login to view URL]("PATH_INFO")
MainDomain = "[login to view URL]"
if pathinfo <> "" then
if instr(lcase(pathinfo),"[login to view URL]") > 0 or
instr(lcase(pathinfo),"[login to view URL]") > 0 or
instr(lcase(pathinfo),"[login to view URL]") > 0 then
MainDomain = MainDomain &"/" &
mid(pathinfo,2,instrrev(pathinfo,"/")-1)
else
MainDomain = MainDomain & pathinfo
end if
else
MainDomain = MainDomain & "/"
end if
if left(hostname,instr(hostname,".")) <> "www." then
bRedirect = true
if instr(lcase(hostname),"[login to view URL]") > 0 or
instr(lcase(hostname),"[login to view URL]") > 0 or
instr(lcase(hostname),"[login to view URL]") > 0 then
bRedirect = true
if bRedirect then
[login to view URL] = "301 Moved Permanently"
[login to view URL] "Location", "http://" &
MainDomain
[login to view URL]
end if
%>
I need a good asp programer familar with on page redirects to review the code. Determine if something in this code is causing the [login to view URL] problem?
Correct the code
add code that would implement a 301 redirect that would redirect www and non www [login to view URL] to [login to view URL] throughout the site. I have attached a notepad txt file of the code as well
## Deliverables
detailed commented asp code corrections and additions that will prevent the generation of malformed urls if necessary. Detailed commented asp code Asp code addition that will preform a 301 redirect of existing mal formed urls to correct urls 1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done.
2) Deliverables must be in ready-to-run condition, as follows (depending on the nature of the deliverables):
a) For web sites or other server-side deliverables intended to only ever exist in one place in the Buyer's environment--Deliverables must be installed by the Seller in ready-to-run condition in the Buyer's environment.
b) For all others including desktop software or software the buyer intends to distribute: A software installation package that will install the software in ready-to-run condition on the platform(s) specified in this bid request.
3) All deliverables will be considered "work made for hire" under U.S. Copyright law. Buyer will receive exclusive and complete copyrights to all work purchased. (No GPL, GNU, 3rd party components, etc. unless all copyright ramifications are explained AND AGREED TO by the buyer on the site per the coder's Seller Legal Agreement).
## Platform
ASP, windows server,