Allow people to modify and add on to rewrite rules.

git-svn-id: http://svn.automattic.com/wordpress/trunk@1350 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
saxmatt 2004-05-23 16:27:59 +00:00
parent 7feb841ed5
commit a4d045fe5b

View File

@ -123,10 +123,12 @@ if ('/' != substr($home_root, -1)) $home_root = $home_root . '/';
RewriteBase <?php echo $home_root; ?>
<?php
$rewrite = rewrite_rules('', $permalink_structure);
$rules = '';
foreach ($rewrite as $match => $query) {
if (strstr($query, 'index.php')) echo 'RewriteRule ^' . $match . ' ' . $home_root . $query . " [QSA]\n";
else echo 'RewriteRule ^' . $match . ' ' . $site_root . $query . " [QSA]\n";
if (strstr($query, 'index.php')) $rules .= 'RewriteRule ^' . $match . ' ' . $home_root . $query . " [QSA]\n";
$rules .= 'RewriteRule ^' . $match . ' ' . $site_root . $query . " [QSA]\n";
}
echo apply_filters('rewrite_rules', $rules);
?>
</textarea>
</p>