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:
saxmatt 2004-01-17 11:21:27 +00:00
parent 5513b10891
commit 2f325bc5c7
2 changed files with 2 additions and 2 deletions

View File

@ -151,7 +151,7 @@ $front = substr($permalink_structure, 0, strpos($permalink_structure, '%'));
<textarea rows="5" style="width: 100%;">RewriteEngine On <textarea rows="5" style="width: 100%;">RewriteEngine On
RewriteBase <?php echo $site_root; ?> RewriteBase <?php echo $site_root; ?>
RewriteRule ^<?php echo $match; echo '$ ' . $site_root . $query ?> [QSA] 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> </form>
</div> </div>
<?php <?php

View File

@ -166,7 +166,7 @@ if ((empty($cat)) || ($cat == 'all') || ($cat == '0')) {
// Category stuff for nice URIs // Category stuff for nice URIs
if ('' != $category_name) { if ('' != $category_name) {
$category_name = preg_replace('|[^a-z0-9-/]|', '', $category_name); $category_name = preg_replace('|[^a-z0-9-]|', '', $category_name);
$tables = ", $tablepost2cat, $tablecategories"; $tables = ", $tablepost2cat, $tablecategories";
$join = " LEFT JOIN $tablepost2cat ON ($tableposts.ID = $tablepost2cat.post_id) LEFT JOIN $tablecategories ON ($tablepost2cat.category_id = $tablecategories.cat_ID) "; $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') "; $whichcat = " AND (category_nicename = '$category_name') ";