mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 01:27:36 +01:00
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:
parent
7feb841ed5
commit
a4d045fe5b
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user