So this is the question, I we tried RewriteRule ^(.*)/?$ /categories.p开发者_开发知识库hp?cat=$1 but it gives me error 500
I think your problem is that you are getting stuck in an infinite loop. Once the url is re-written, mod_rewrite starts over with all of the rules. So you either need to add a RewriteCond to exclude categories.php, or you might be able to use the L flag to signal that this is the last rule:
RewriteRule ^(.*)/?$ /categories.php?cat=$1 [L]
精彩评论