Url重写动态php页面不能双向工作

My web page is largely dynamic. I figured out how to rewrite these URLs (apache server).

The first page I did is https://www.roguefab.com/category.php?category=Tubing_Benders

The clean URL for this page is https://www.roguefab.com/category/tubing_benders

If you navigate to www.roguefab.com/category/Tubing_Benders, it works perfect (shows my content and the clean URL). If I navigate directly or with a link to the dirty URL, it shows the dirty URL. Why? Shouldn't it show the clean one?

My rewrite code is just like every other one I've seen: RewriteRule ^category/([0-9a-zA-Z_]+) category.php?category=$1 [NC,L]