Asp on page Redirect Help

Cancelado Publicado Mar 4, 2006 Pagado a la entrega
Cancelado Pagado a la entrega

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 [url removed, login to view] showing up in googles index instead of [url removed, login to view] 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 = [url removed, login to view]("HTTP_HOST")

pathinfo = [url removed, login to view]("PATH_INFO")

MainDomain = "[url removed, login to view]"

if pathinfo <> "" then

if instr(lcase(pathinfo),"[url removed, login to view]") > 0 or

instr(lcase(pathinfo),"[url removed, login to view]") > 0 or

instr(lcase(pathinfo),"[url removed, login to view]") > 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),"[url removed, login to view]") > 0 or

instr(lcase(hostname),"[url removed, login to view]") > 0 or

instr(lcase(hostname),"[url removed, login to view]") > 0 then

bRedirect = true

if bRedirect then

[url removed, login to view] = "301 Moved Permanently"

[url removed, login to view] "Location", "http://" &

MainDomain

[url removed, login to view]

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 [url removed, login to view] problem?

Correct the code

add code that would implement a 301 redirect that would redirect www and non www [url removed, login to view] to [url removed, login to view] 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,

ASP Ingeniería Microsoft MySQL Odd Jobs PHP Arquitectura de software Verificación de software Web Hosting Gestión de páginas web Verificación de páginas web Windows Desktop

Nº del proyecto: #3329339

Sobre el proyecto

5 propuestas Proyecto remoto Activo Mar 6, 2006

5 freelancers están ofertando un promedio de $52 por este trabajo

TakeReal

See private message.

$17 USD en 1 día
(1332 comentarios)
7.5
ramsbab

See private message.

$42.5 USD en 1 día
(8 comentarios)
4.1
devildogvw

See private message.

$12.75 USD en 1 día
(16 comentarios)
3.8
flexorbits

See private message.

$170 USD en 1 día
(1 comentario)
3.6
infiniteloo

See private message.

$17 USD en 1 día
(6 comentarios)
3.1