I'm using this Rewrite Rules Inspector plugin to see my rewrite rules if there is any wrong in my code and i have one :
add_rewrite_rule(
'/?([^/]+(?<!categories))/([^/]+)/?$',//preg_quote('/?([^/]+(?<!categories))/([^/]+)/?$')
'index.php?list-item=$matches[2]&post_type=list-item',
'top'
);
I have two questions :
1- This code works well with all content types that i have put doesn't work with category page it gives me error ** preg_match() [function.preg-match]: Unknown modifier 'c' **
2- How to change the category page to get from custom content type not from post type.