Setting Headers on a Redirect Scenario

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

 



Ok, I'm pretty sure I know the answer to this, but wanted to run it by
people more experienced.  I have an unusual request from some business
users.  They want to be able to request a pdf document from one site
(which we do control) when in a web page on a *different* site (which
we do control) *and* have it give that dialog where it prompts the
user to save it.  This is the general idea:

1 User hits http://foo.com/sec1/blah/mydoc1.pdf
2 Apache for foo.com "pulls" that pdf as a request to
http://bar.com/blah/otherstuff/mydoc1.pdf
3 Apache for foo.com the offers up the pdf via the original page via
the "save" dialog

The first, naive idea was to have something like this in the virtual
host on foo.com:

RewriteRule ^/sec1/(*.pdf) http://bar.com/blah/otherstuff/mydoc1.pdf

<FilesMatch "/sec1/*.pdf">
  Header always set Content-Disposition attachment
</FilesMatch


But that's not going to work, right?  Since Apache's going to see that
request, redirect it to the other site, and then the *other* site is
the thing serving up that request, so there's no way the first one can
modify it, right?

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux