.htaccess 阻止移动(iOS/Android)访问magento中的单个CMS页面
在apache中,我想我可以使用.htaccess访问控制选项 例如: SetEnvIf用户代理BadBot GoAway=1 命令允许,拒绝 通融 拒绝来自env=GoAway.htaccess 阻止移动(iOS/Android)访问magento中的单个CMS页面,.htaccess,magento,.htaccess,Magento,在apache中,我想我可以使用.htaccess访问控制选项 例如: SetEnvIf用户代理BadBot GoAway=1 命令允许,拒绝 通融 拒绝来自env=GoAway 但是如何阻止移动设备(iOS/Android)访问magento中的单个CMS页面???观察match方法中的CMS\u controller\u router\u match\u Prefore事件,并检查observer方法中的user agent标头。可能,请参阅 public function checkRes
但是如何阻止移动设备(iOS/Android)访问magento中的单个CMS页面???观察match方法中的
CMS\u controller\u router\u match\u Prefore
事件,并检查observer方法中的user agent标头。可能,请参阅
public function checkRestrictAccess(Varien_Event_Observer $o)
{
/**
* Browser detection logic will go here.
*/
if (mobile browser == true && $o->getCondition()->getIdentifier() == 'page-id') {
$o->getRequest()->setRedirectUrl(Redirect Url);
}
}