[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: redirect.pl sez Content-Type: application/x-perl

Josip Rodin said:
> Yeah, but the CGI(3pm) manual page says that that shouldn't be done:
>        The redirect() function redirects the browser to a
>        different URL.  If you use redirection like this, you
>        should not print out a header as well.

If you don't use CGI.pm's redirect() then the script just needs to spit
out the following:

	"Content-Type: text/html\nLocation: $url\n\n"

I haven't looked at (don't have access to) the source of the Perl script
in question, so just gave as many suggestions as I could think of.  =)

I think the Apache config options I gave before are the best choice
though, given my understanding of the situation.

> I think I'll experiment with Apache's rewrite rules instead, that seems
> much, much cleaner.

Won't that require replication of the rules at each Debian web mirror?
(I'm not exactly sure how you're intending to implement this.)


Andrew Shugg <andrew@neep.com.au>                   http://www.neep.com.au/

"Just remember, Mr Fawlty, there's always someone worse off than yourself."
"Is there?  Well I'd like to meet him.  I could do with a good laugh."

Reply to: