需要帮助htaccess重定向

时间:2014-05-23 07:45:49

标签: php apache .htaccess mobile http-redirect

如何在HTACCESS中实现这一目标。我想要的是,如果用户正在使用智能手机设备并访问链接http://luxury.localhost/others/mypage.html,他将被重定向到http://luxury.localhost/sp/entry,但如果他只是使用PC,他将被重定向到http://luxury.localhost/entry页。

代码:

# the logic is something like this
# If using smartphone
RedirectMatch /others/mypage.html /sp/entry/

# else if using PC
RedirectMatch /others/mypage.html /entry/

请帮帮我。

由于

0 个答案:

没有答案