chmpdog Posted April 1, 2009 Share Posted April 1, 2009 Hey my code is below for my .htaccess file, but I am having a problem. The first rewrite works, but when I try to do the second one with the additional $_GET I cant use id in my code. How do I fix this? Thanks <IfModule mod_rewrite.c> RewriteEngine On RewriteBase /site/ Options +FollowSymLinks RewriteEngine on RewriteRule (.*).html$ /site/index.php?hello=$1 RewriteRule (.*).html?id=(.*)$ /site/index.php?hello=$1&id=$2 </IfModule> Quote Link to comment https://forums.phpfreaks.com/topic/152011-url-rewrite-problem/ Share on other sites More sharing options...
wildteen88 Posted April 1, 2009 Share Posted April 1, 2009 Reverse the order of your rewrite rules RewriteRule (.*).html?id=(.*)$ /site/index.php?hello=$1&id=$2 [L] RewriteRule (.*).html$ /site/index.php?hello=$1 [L] Quote Link to comment https://forums.phpfreaks.com/topic/152011-url-rewrite-problem/#findComment-798796 Share on other sites More sharing options...
chmpdog Posted April 1, 2009 Author Share Posted April 1, 2009 Thanks for the reply, but that didn't work. It still doesn't interpret the $_GET tags. Quote Link to comment https://forums.phpfreaks.com/topic/152011-url-rewrite-problem/#findComment-799066 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.