4images Forum & Community

4images Help / Hilfe => Bug Fixes & Patches => Topic started by: V@no on April 11, 2006, 03:10:09 AM

Title: [1.7 - 1.7.2] Extra backslash in URLs ( http://example.com\/index.php )
Post by: V@no on April 11, 2006, 03:10:09 AM
On some servers that is running Windows OS, some URLs can get an extra backslash, which in some cases could produce 404 error.
If you are NOT experiencing such problem, you dont need apply this fix


In global.php find:
Code: [Select]
  $script_url .= (dirname($PHP_SELF) != "/") ? dirname($PHP_SELF) : "";

Replace it with:
Code: [Select]
  $dirname = str_replace("\\", "/", dirname($PHP_SELF));
  $script_url .= ($dirname != "/") ? $dirname : "";