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

RE: mp1 internal_redirect question


Title: Re: mp1 internal_redirect question
Perrin:
 
Good info....I will make note of it....But our situation might be a bit different. Within the block that failed is a MIME::Lite::SMTP mail sending call. The content of the mail is standardized for everyone except for name etc. For most people, it either does not fail or fail with error message logged.....but sometimes it failed without loggin any error message. For a eval{} or die "" block if the message of die was not logged, I guess the process got aborted within the eval block....I tested many ways, but could not figure out how the process could be aborted within the eval block....
 
Thanks
Ron


From: suppressed on behalf of Perrin Harkins
Sent: Fri 12/7/2007 4:45 PM
To: Silent
Cc: suppressed
Subject: Re: mp1 internal_redirect question

On Dec 6, 2007 8:36 PM, Silent <suppressed> wrote:
> # my mod_rerite.conf
> # section 1
> RewriteEngine On
> RewriteCond %{HTTP_USER_AGENT} Firefox  [OR]
> RewriteCond %{HTTP_USER_AGENT} lwp-request [OR]
> RewriteRule ^/mp3/aaa\.mp3$            /mp3/aaa.html
>
> # section 2
> RewriteCond %{HTTP_USER_AGENT} MSIE
> RewriteRule /fake.html         /mp3/bbb.mp3

You can do all of that in a PerlTransHandler with an internal redirect.

> I just add section 2 now, but when I access http://../fake.html  with IE,
> windows media-player auto-lanched, but can not play the file, maybe because
> the filename is html

Usually it's the MIME-Type that matters, but IE is notorious for
looking at file extensions.

- Perrin


Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.