How can I do if($_GET['category'] == $cat) { //stuff } PHP: with .htaccess rewrite on? The rewrite is: RewriteRule ^category/([^/]+)?$ index.php?category=$cat [QSA,L] Code (markup): I cant seem to get it to work. (never did rewrite before)
Did you try this: RewriteEngine On RewriteRule ^category/([^/]+)?$ index.php?category=$1 Code (markup): You can call url then with http://www.yourwebsite.com/category/5 if(isset($_GET['category'])) { echo "Category is: ".$_GET['category']; } PHP: