URL Redirection ?
alex2016 | Posted 1:22am 4. December 2007 Server Time |
Hello all,
Pls help me.
For example I have this URL :
http://www.haneng.com/download.asp/haneng_logo.jpg
but I want to it to access download.asp instead of showing HTTP 404 URL Not Found. I'm using IIS 5.
Please advice me.
Thanks. |
Madhan | Posted 4:06am 6. December 2007 Server Time |
Hi,
Can you please give some more info.
Do you want to redirect to the image? or what do u want exactly?
Regards,
Madhan
WizzKidd | Posted 5:14am 6. December 2007 Server Time |
Did you mean to type: http://www.haneng.com/download.asp?file=haneng_logo.jpg
alex2016 | Posted 7:33pm 6. December 2007 Server Time |
hi, thx for the reply...
@WizzKidd
Did you mean to type: http://www.haneng.com/download.asp?file=haneng_logo.jpg
no...I did really mean about : http://www.haneng.com/download.asp/haneng_logo.jpg
actually I'm building WAP site using ASP, users can download several contents such wallpaper, animated gif, music MP3, and music midi from their mobile phone.
in the past I used http://www.haneng.com/download.asp?id=xxx and open the desired file and flush it to user, work fine, unless it is being saved as "download.gif", "download.mp3", "download.jpg", instead of its real name, below is how I'm doing this ...
===
Set objStream = Server.CreateObject("ADODB.Stream")
objStream.Charset = "UTF-8"
objStream.Type = 1 'Binary
objStream.Open
objStream.LoadFromFile strFileLocation
Response.Clear
Response.AddHeader "Content-Disposition", "attachment;filename=" & strLocation
Response.ContentType = "image/gif" '-->MIME content type
Response.BinaryWrite (objStream.Read)
Response.Flush
objStream.Close
Set objStream = Nothing
===
after searching many times, I see that php user can do something like : http://www.haneng.com/download.asp/haneng_logo.jpg?id=xxx
and PHP is quite smart that it directs to "download.asp" (.php?) instead of to "haneng_logo.jpg" (file not found)
the same thing with ASP.net, it can directs us to "download.asp" (.aspx?) instead of to "haneng_logo.jpg" (file not found)
I tried the same method in ASP, and receiving HTTP 500 error (sometimes got HTTP 404 not found)
^__^
confused
hahaha..
Reply to Post URL Redirection ?
|
|
|