How to redirect a pdf

E

Evertjan.

mvr wrote on 15 aug 2006 in microsoft.public.inetserver.asp.general:
I was using Response.Redirect for ASP pages, and
<META HTTP-EQUIV="Refresh"
CONTENT="5; URL=html-redirect.html"> to redirectand html page.
Is there any we can redirect a pdf document from one server to another.
http://oldserver/test.pdf to http://newserver/newtest.pdf.

Add a line or two in your 404.asp file capturing the not found pdf,
and do a redirect:

qstr = lcase(Request.ServerVariables("QUERY_STRING"))
if instr(qstr,"/test.pdf")>0 then
response.redirect "http://newserver/newtest.pdf"
end if
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,598
Members
45,151
Latest member
JaclynMarl
Top