4images Forum & Community

4images Help / Hilfe => Bug Fixes & Patches => Topic started by: V@no on October 20, 2008, 07:09:14 AM

Title: [1.7 - 1.7.6] Redirects don't work on sites with non-standard port
Post by: V@no on October 20, 2008, 07:09:14 AM
If a website uses non-standard port (i.e. http://example.com:12345/4images) redirects (i.e. after login or logout) won't work on some browsers (Internet Explorer, Google Chrome).

The problem is in $_SERVER['HTTP_HOST'] which might contain the port number.

To fix this find in global.php:
  $script_url .= (!empty($HTTP_SERVER_VARS['HTTP_HOST'])) ? $HTTP_SERVER_VARS['HTTP_HOST'] : getenv("SERVER_NAME");


Insert BELOW:
  if ($port) $script_url = str_replace($port, "", $script_url);
Title: Re: [1.7 - 1.7.6] Redirects don't work on sites with non-standard port
Post by: xbox1 on April 30, 2009, 02:51:58 AM
Thanks a lot....

I fixed it....
Title: Re: [1.7 - 1.7.6] Redirects don't work on sites with non-standard port
Post by: Tino23 on August 31, 2010, 06:24:24 PM
In der 1.7.8 Version steht an der Stelle
Code: [Select]
if ($port) $script_url = str_replace(":".$port, "", $script_url);Ist der auch für die 1.7.6 Version gültig?
Title: Re: [1.7 - 1.7.6] Redirects don't work on sites with non-standard port
Post by: V@no on September 01, 2010, 05:29:58 AM
1.7.8 has all the fixes from v1.7 to v1.7.7

(or I didn't understand you question...)