Re: URL Rewriting for certain file types



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!





.



Relevant Pages

  • Re: 2003 Server ASP.NET Problem (IE Only!)
    ... Is scripting disabled in the browser? ... It doesn't seem to be a problem with IIS, since IIS does not care about ... > first screen and clicks "Login", but the app doesn't do anything. ...
    (microsoft.public.inetserver.iis)
  • Re: Custom 401 page problems
    ... Since you configured IIS to send a staic for this ... Now, a 401 response comes back to the client, and the entite body is the ... it is going to make a new request for this resource ... What request do you think the browser makes to fetch the 401.gif ??? ...
    (microsoft.public.inetserver.iis)
  • Re: aspx file not working
    ... have you gone into IIS and made sure the wwwroot is running 2.0? ... directory on the browser, it won't display. ... reached this page by clicking a link, contact the Web site administrator ... · Click the Back ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Still Need desperate help to start with ASP NET - simplified problems - HELP!!
    ... You write that there is no IIS involved. ... which client sent it. ... browser and viceversa, I want the browser to display what the win ... running on the server? ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: webpage has expired after file upload
    ... "Web Page expired" does not come from IIS. ... Browser shows that message when displayed page is result of method "POST". ... So when you navigate away from that page and then hit "back" browser must ... in order to upload another file. ...
    (microsoft.public.dotnet.framework.aspnet)