开发者

Best way to rewrite modern browsers to modern version of app?

I have a Flash app at URL-A. I have a new non Flash version, that only works in modern browsers at URL-B. I can redirect all visitors from URL-A to URL-B with .htaccess or PHP but I wont know what browser they have in order to determine if I need to redirect or not.

So I am not sure what the best way to go about this is.

Basically if you are using IE8+, FF, Chrome, Safar, Opera I want you to go t开发者_开发知识库o URL-B. If you are using IE7- I want you to go to URL-A

Whats the best way to do this?


If you have no problem with using a small PHP library, look at the answer to this question and do a header("Location:url") redirect depending on which result you get.

If you'd rather use a .htaccess file, you could parse the USER_AGENT as shown in this question (it's aimed at mobile browsers but doesn't really matter). The PHP solution is much more convenient though.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜