Home All Groups Group Topic Archive Search About

Redirecting on Failed Image 404



Author
9 Mar 2005 2:44 PM
Keith
I have some images on a domain (http://www.domain.com/image1.jpg for
example).

I want to create a sub-domain so that the images will be
http://images.domain.com/image1.jpg for example.

Once I move the images to the sub-domain any requests to the old locations
will result in a 404.

Is there any way to redirect all failed image requests to the new location?
Maybe by modifying the 404 page?

Author
9 Mar 2005 3:10 PM
Aaron [SQL Server MVP]
Sure, some techniques here on modifying the 404 handler to do custom things
(e.g. based on file extension):

http://www.aspfaq.com/2162

--
http://www.aspfaq.com/
(Reverse address to reply.)




Show quote
"Keith" <@.> wrote in message news:ehom8ZLJFHA.3928@TK2MSFTNGP09.phx.gbl...
> I have some images on a domain (http://www.domain.com/image1.jpg for
> example).
>
> I want to create a sub-domain so that the images will be
> http://images.domain.com/image1.jpg for example.
>
> Once I move the images to the sub-domain any requests to the old locations
> will result in a 404.
>
> Is there any way to redirect all failed image requests to the new
location?
> Maybe by modifying the 404 page?
>
>

AddThis Social Bookmark Button