chmpdog Posted June 17, 2009 Share Posted June 17, 2009 Hey. Im using a mod rewrite, but I cant use $_get variables in my code. Why is this? here is my rewrite: <IfModule mod_rewrite.c> RewriteEngine On RewriteBase /hunt/ Options +FollowSymLinks RewriteRule (.*).html$ /hunt/index.php?task=$1 [L] Quote Link to comment https://forums.phpfreaks.com/topic/162655-solved-mod-rewrite-help-with-_get-tags/ Share on other sites More sharing options...
wildteen88 Posted June 18, 2009 Share Posted June 18, 2009 If your links are like pagename.html?var=value&foo=bar etc then you need to tell mod_rewrite to pass on the query string by using the QSA flag RewriteRule (.*).html$ /hunt/index.php?task=$1 [L,QSA] Quote Link to comment https://forums.phpfreaks.com/topic/162655-solved-mod-rewrite-help-with-_get-tags/#findComment-859017 Share on other sites More sharing options...
chmpdog Posted June 18, 2009 Author Share Posted June 18, 2009 thanks, does it matter if I still have the [l,qsa] becasue it works with just [qsa] Quote Link to comment https://forums.phpfreaks.com/topic/162655-solved-mod-rewrite-help-with-_get-tags/#findComment-859076 Share on other sites More sharing options...
wildteen88 Posted June 18, 2009 Share Posted June 18, 2009 If you only have one rewriteRule you can remove the L flag. This flag should only be used when you have more than one rewriteRule. Quote Link to comment https://forums.phpfreaks.com/topic/162655-solved-mod-rewrite-help-with-_get-tags/#findComment-859089 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.