[Project_owners] redirecting a tar.gz file

Erich Reto Iseli erich.iseli at iseli.org
Fri Nov 14 10:08:55 EST 2003


Hello all,

I've got a .tar.gz file inside the www structure and I'd like to move it 
over to the downloads directory.

The problem is that some people are linking directly to the file in the 
www directory. Therefore I'd like to display the tar.gz as an html file 
and tell the users that they should update their bookmarks yada yada 
yada and give them the new link.

So far, I've tried by creating a text file called test.tar.gz with the 
following content:

<?php header( "Content-type: text/html" ); ?>
<h2>Trying redirection</h2>
<p>This file should display as html.</p>

When loading this file, mozilla tried to download it. Of course, since 
the headers sent are Content-Type: application/x-gzip

Why didn't it change? obviously, gar.gz files are not passed to the php 
interpretator, like html files.

How can I "hack" the local.conf file of the directory so that this file 
won't be passed as x-gzip but as html?

ricky



More information about the Project_owners mailing list