Fixed rewrite rule for when WP is installed in a subdir.

git-svn-id: http://svn.automattic.com/wordpress/trunk@543 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
emc3 2003-11-11 22:15:16 +00:00
parent 15b9216634
commit d50c6931f0
1 changed files with 2 additions and 2 deletions

View File

@ -126,7 +126,7 @@ $match = str_replace($rewritecode, $rewritereplace, $match);
preg_match_all('/%.+?%/', $permalink_structure, $tokens); preg_match_all('/%.+?%/', $permalink_structure, $tokens);
$query = '/index.php?'; $query = 'index.php?';
for ($i = 0; $i < count($tokens[0]); ++$i) { for ($i = 0; $i < count($tokens[0]); ++$i) {
if (0 < $i) $query .= '&'; if (0 < $i) $query .= '&';
$query .= str_replace($rewritecode, $queryreplace, $tokens[0][$i]) . '$'. ($i + 1); $query .= str_replace($rewritecode, $queryreplace, $tokens[0][$i]) . '$'. ($i + 1);
@ -136,7 +136,7 @@ for ($i = 0; $i < count($tokens[0]); ++$i) {
?> ?>
<p><code>RewriteEngine On<br /> <p><code>RewriteEngine On<br />
RewriteBase <?php echo $site_root; ?><br /> RewriteBase <?php echo $site_root; ?><br />
RewriteRule ^<?php echo $match; echo '$ ' . $query ?> [QSA]</code></p> RewriteRule ^<?php echo $match; echo '$ ' . $site_root . $query ?> [QSA]</code></p>
</div> </div>
<?php <?php
} else { } else {