Ticket #31 (closed enhancement: fixed)
Trouble using 404handler.php to redirect to the correct page under IIS
| Reported by: | MickeyM | ||
|---|---|---|---|
| Priority: | medium | Milestone: | 7.1 |
| Component: | ExiteCMS Core | Version: | 7.0 |
| Severity: | Fix | Keywords: | 404handler iis |
Description
On a Windows server with IIS used to publish the website, there are some $_SERVER variables not available.
Therefore the page is incorrectly loaded.
Suggestion is that the following code snippet is added to the 404handler.php file:
require_once dirname(__FILE__)."/includes/core_functions.php";
// Check if we use IIS.
if (strpos( $_SERVER["SERVER_SOFTWARE"],"IIS" )) {
$_SERVER['REDIRECT_URL'] = substr($_SERVER['REQUEST_URI'], strrpos($_SERVER['REQUEST_URI'], '/'), strlen($_SERVER['REQUEST_URI']));
}
Variables are filled as follows:
[REQUEST_URI] => /404handler.php?404; http://dev.deottershetgooi.nl:80/diplomazwemmen.php
[URL] => /404handler.php?404; http://dev.deottershetgooi.nl:80/diplomazwemmen.php
Instead of REQUEST_URI, we can also use URL.
Change History
Note: See
TracTickets for help on using
tickets.
