Checking in rewriterule [QSA] to append query string. Adding check for force=1.

Both changes from bug 388592.


git-svn-id: svn://10.0.0.236/trunk@230715 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
morgamic%mozilla.com
2007-07-24 01:37:42 +00:00
parent 57a0b24222
commit ea8a3eb653
2 changed files with 10 additions and 5 deletions

View File

@@ -2,7 +2,7 @@
# TODO: Then use PHP to parse path using pathinfo() instead.
RewriteEngine On
RewriteBase /~morgamic/aus
RewriteRule ^update2/(.*)$ index.php?path=$1
RewriteRule ^update/(.*)$ index.php?path=$1
RewriteRule ^update2/(.*)$ index.php?path=$1 [QSA]
RewriteRule ^update/(.*)$ index.php?path=$1 [QSA]
php_value error_reporting 2047
php_value display_errors 1

View File

@@ -53,9 +53,14 @@ require_once('./inc/init.php');
// Instantiate XML object.
$xml = new Xml();
// Before we get started check throttle and see if we want to randomly serve an
// update for this request.
if (defined('THROTTLE') && THROTTLE && defined('THROTTLE_LEVEL') && mt_rand(0,100) > THROTTLE_LEVEL) {
// Check to see if the user is explicitly requesting an update. If they are,
// skip throttling. If they aren't, and throttling is enabled, randomly serve
// updates based on the configured random seed.
if ( $_GET['force']!=1 &&
defined('THROTTLE') &&
THROTTLE &&
defined('THROTTLE_LEVEL') &&
mt_rand(0,100) > THROTTLE_LEVEL ) {
if (defined('THROTTLE_LOGGING') && THROTTLE_LOGGING) {