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

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.