Search code examples
phpinternet-exploreryii2http-status-code-403

Yii2 #403 error in IE only, and also when compatibility view mode is on


My application is developed in Yii2 running on LAMP over intranet only. Strange issue is Project URL opens fine in Chrome with below URL entered and redirected to login URL below.

http://localhost/portal/ redirects to http://localhost/portal/frontend/web/index.php/site/login

Even this work fine with IE compatibility view mode off.

But when compatibility view is on, it redirects to below URL and gives #403 authentication error.

http://localhost/portal/frontend/web/index.php/

If any one can help me with Yii application page life cycle / compile sequence and provide solution to above issue would be great.

Thanks in advance.


Solution

  • You can try to ignore IE compatibility view settings by adding the following meta tag in your main.php

    <meta http-equiv="X-UA-Compatible" content="IE=edge"/>