mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-22 17:18:32 +01:00
Make category matching liberal in the mod_rewrite and then strip it in blog header, because we're going to need that for 1.1 anyway, people are having trouble with it moving from 1.0 -> 1.0.1, and the change isn't really needed.
git-svn-id: http://svn.automattic.com/wordpress/trunk@782 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
5513b10891
commit
2f325bc5c7
@ -151,7 +151,7 @@ $front = substr($permalink_structure, 0, strpos($permalink_structure, '%'));
|
||||
<textarea rows="5" style="width: 100%;">RewriteEngine On
|
||||
RewriteBase <?php echo $site_root; ?>
|
||||
RewriteRule ^<?php echo $match; echo '$ ' . $site_root . $query ?> [QSA]
|
||||
RewriteRule ^<?php echo $catmatch; ?>?([0-9a-z-]+)?/? <?php echo $site_root; ?>index.php?category_name=$1 [QSA]</textarea>
|
||||
RewriteRule ^<?php echo $catmatch; ?>?(.*) <?php echo $site_root; ?>index.php?category_name=$1 [QSA]</textarea>
|
||||
</form>
|
||||
</div>
|
||||
<?php
|
||||
|
@ -166,7 +166,7 @@ if ((empty($cat)) || ($cat == 'all') || ($cat == '0')) {
|
||||
// Category stuff for nice URIs
|
||||
|
||||
if ('' != $category_name) {
|
||||
$category_name = preg_replace('|[^a-z0-9-/]|', '', $category_name);
|
||||
$category_name = preg_replace('|[^a-z0-9-]|', '', $category_name);
|
||||
$tables = ", $tablepost2cat, $tablecategories";
|
||||
$join = " LEFT JOIN $tablepost2cat ON ($tableposts.ID = $tablepost2cat.post_id) LEFT JOIN $tablecategories ON ($tablepost2cat.category_id = $tablecategories.cat_ID) ";
|
||||
$whichcat = " AND (category_nicename = '$category_name') ";
|
||||
|
Loading…
Reference in New Issue
Block a user