0
0

Corrected redirect bug - fixed request_uri position during checks.

This commit is contained in:
Bryan Pedini 2019-04-30 12:00:55 +02:00
parent fe09cd7496
commit 08f540057f
No known key found for this signature in database
GPG Key ID: 688D440AE31B40C2
3 changed files with 5 additions and 5 deletions

View File

@ -1,3 +1,3 @@
RewriteEngine on RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?query=$1 [L,QSA] RewriteRule ^(.*)$ index.php?URI=$1 [L,QSA]

View File

@ -2,9 +2,9 @@
session_start ( ); session_start ( );
require_once ( 'functions.php' ); require_once ( 'functions.php' );
$GLOBALS [ 'config' ] = load_config ( ); $GLOBALS [ 'config' ] = load_config ( );
$GLOBALS [ 'request_uri' ] = split_uri_array ( ); $GLOBALS [ 'request_uri' ] = explode ( "/", $_GET [ 'URI' ] );
if ( isset ( $request [ 0 ] ) && $request [ 0 ] != "" ) { if ( isset ( $GLOBALS [ 'request_uri' ] [ 0 ] ) && $GLOBALS [ 'request_uri' ] [ 0 ] != "" ) {
switch ( $request [ 0 ] ) { switch ( $GLOBALS [ 'request_uri' ] [ 0 ] ) {
case "go": case "go":
include ( 'lib/php/go.php' ); include ( 'lib/php/go.php' );
break; break;

View File

@ -3,7 +3,7 @@
header ( "Location: " . substr ( $_SERVER [ 'SCRIPT_NAME' ], 0, -10 ) . "/insert" ); header ( "Location: " . substr ( $_SERVER [ 'SCRIPT_NAME' ], 0, -10 ) . "/insert" );
exit; exit;
} }
if ( isset ( $request [ 1 ] ) && $request [ 1 ] == "forgot" ) { if ( isset ( $GLOBALS [ 'request_uri' ] [ 1 ] ) && $GLOBALS [ 'request_uri' ] [ 1 ] == "forgot" ) {
include ( $config [ 'installation_path' ] . '/lib/php/forgot.php' ); include ( $config [ 'installation_path' ] . '/lib/php/forgot.php' );
exit; exit;
} }