Last active
January 14, 2020 01:29
-
-
Save ynishi2014/36a6c1ccc96241d858e6ae7c13b7b55b to your computer and use it in GitHub Desktop.
Office製品からのリンクでログイン画面に飛ばされないようにする
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//WordやExcelからのリクエストが来た場合は、何も返さない。 | |
//ログイン判定を行うと、Excelではログインしていないため、ログインページにリダイレクトされてしまう | |
if (strpos(strtolower($_SERVER['HTTP_USER_AGENT'] ?? ''), 'office') !== false) { | |
exit; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment