[Zope] Redirect problem
Ken
firerooster@netscape.net
Mon, 11 Nov 2002 16:53:32 +0100 (CET)
Zopers and Zoperinas,
I was having this problem...
>>> This works:
>>>
>>> <dtml-var standard_html_header>
>>> <dtml-call "RESPONSE.redirect('http://dogjoy.freezope.org/redirect.html')">
>>> <dtml-var standard_html_footer>
>>>
>>> But this doesn't:
>>>
>>> <dtml-var standard_html_header>
>>> <dtml-call "RESPONSE.redirect('http://dogjoy.freezope.org/redirect.pdf')">
>>> <dtml-var standard_html_footer>
OK, it wasn't a Zope problem, but in case somebody comes to this archive in 2046 wondering what the solution was, here's one:
<dtml-if "_.string.find(linkurl,'.pdf')>0">
<html>
<head>
<meta http-equiv="refresh" content="0; URL=<dtml-var linkurl>">
</head>
</html>
<dtml-else>
<dtml-call "RESPONSE.redirect(linkurl)">
</dtml-if>
The meta refresh is slower, hence the dtml-if.
We now return to our regular programming...
Ken