Author Topic: [1.7 - 1.7.2] Extra backslash in URLs ( http://example.com\/index.php )  (Read 19589 times)

0 Members and 1 Guest are viewing this topic.

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
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 : "";
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)