Re: URL Rewriting for certain file types
- From: "George Ter-Saakov" <gt-nsp@xxxxxxxxxxx>
- Date: Thu, 25 Oct 2007 13:05:54 -0400
Then you do not have a choice.
Except on new IIS 7.0, I believe with IIS 7 you can route any HttpRequest
through ASP.NET
George
"BillAtWork" <BillAtWork@xxxxxxxxxxxxx> wrote in message
news:6AFAFE3B-C6B7-44DC-B6AB-C70EC6B13BD6@xxxxxxxxxxxxxxxx
Unfortunately I can't implement it that way because the requests are
coming
from external systems. They don't want to implement a special format just
for
this app. It has to be:
http://www.site.com/special/aaa.jpg
http://www.site.com/special/bbb.jpg
etc.
Thanks.
"George Ter-Saakov" wrote:
You can always use a work around using "downloader" approach.
Instead of giving out the direct link to the document. Have it like that
http://www.mysite.com/downloader.aspx?file=my.jpg
Then your downloader.aspx will do what it needs to do, figure out where
my.jpg is residing and the use Response.WriteFile to output file to
browser.
The file my.jpg might not even be available through direct download.
George.
"BillAtWork" <BillAtWork@xxxxxxxxxxxxx> wrote in message
news:89B5348C-2C2C-446B-B897-5F46EAA5E9CA@xxxxxxxxxxxxxxxx
Hi,
I've implemented a very simple URL rewriter using an HttpModule. It
simply
intercepts the url, looks it up in a local config table and redirects
the
browser to a different URL.
Of course, this only works for files with extensions that cause them to
be
processed by ASP.NET. It doesn't work for file types server by IIS
only,
e.g.
".jpg".
I believe I can change the machine.config to make "jpg" files go
through
ASP.NET but what if I install this app on a "hosted" site where I can't
make
changes to the machine.config. Is there any other way to make this
happen?
Preferably I also want it to be limited to files in specific folder
i.e.
/special/my.jpg will redirect but /images/logo.jpg behaves as normal
(to
keep
up performance).
Thanks!
.
- Follow-Ups:
- Re: URL Rewriting for certain file types
- From: Steven Cheng[MSFT]
- Re: URL Rewriting for certain file types
- References:
- URL Rewriting for certain file types
- From: BillAtWork
- Re: URL Rewriting for certain file types
- From: George Ter-Saakov
- URL Rewriting for certain file types
- Prev by Date: Re: Zone Alarm and ASP.NET 2.0
- Next by Date: Re: Zone Alarm and ASP.NET 2.0
- Previous by thread: Re: URL Rewriting for certain file types
- Next by thread: Re: URL Rewriting for certain file types
- Index(es):
Relevant Pages
|