Skip to content

Instantly share code, notes, and snippets.

@IronGhost63
Created May 31, 2017 12:38
Show Gist options
  • Save IronGhost63/00a7a0190ac0985d679136373aea0e1e to your computer and use it in GitHub Desktop.
Save IronGhost63/00a7a0190ac0985d679136373aea0e1e to your computer and use it in GitHub Desktop.
[Hook] Fix Thai URL on IIS
<?php
function fix_iis_thai_url(){
global $_SERVER;
$_SERVER['REQUEST_URI'] = isset($_GET['requesturi']) ? $_GET['requesturi'] : '/';
}
add_action("plugins_loaded", "fix_iis_thai_url");
/*
Still need another fix on web.config
Replace: <action type="Rewrite" url="index.php"/>
With: <action type="Rewrite" url="index.php?requesturi={URL}"/>
*/
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment