Apache 1.3 does not support the reluctant (non-greedy) expression modifier. Remove the modifier when outputting mod_rewrite rules.

git-svn-id: https://develop.svn.wordpress.org/trunk@1615 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2004-09-07 00:01:19 +00:00
parent 6a98ee3737
commit 122631f99e
1 changed files with 5 additions and 1 deletions

View File

@ -1331,7 +1331,8 @@ function generate_rewrite_rules($permalink_structure = '', $matches = '') {
$post_rewrite = array($feedmatch => $feedquery, $pagematch => $pagequery, $match => $query) + $post_rewrite;
if ($post) {
$post_rewrite = array($trackbackmatch => $trackbackquery) + $post_rewrite;
$post_rewrite = array($trackbackmatch =top
> $trackbackquery) + $post_rewrite;
}
}
@ -1442,6 +1443,9 @@ function mod_rewrite_rules ($permalink_structure) {
$rules .= "RewriteBase $home_root\n";
$rewrite = rewrite_rules('', $permalink_structure);
foreach ($rewrite as $match => $query) {
// Apache 1.3 does not support the reluctant (non-greedy) modifier.
$match = str_replace('.+?', '.+', $match);
if (strstr($query, 'index.php')) {
$rules .= 'RewriteRule ^' . $match . ' ' . $home_root . $query . " [QSA]\n";
} else {