We are trying to get the urls to rewrite and show in the address bar. You can manually type the address of domain.com/category/category-1 into the address bar and it will take you to the appropriate page but redirects to the page with id and does not show the same url in the address bar. Code: RewriteRule ^category/category-([0-9]+)/?$ category/index.php?id=1¤tpage=$1&cat=Category [L,NC]