SharkBait Posted October 15, 2007 Share Posted October 15, 2007 Hi, I want to be able to have a URL like this: www.myurl.com/?m=show&id=3 which normally points to index.php redirect to index2.php. This is what I have but I think the first ? is messing up the rule: RewriteRule ^?m=show&id=([0-9]+)$ index2.php?m=show&id=$1 What can I do do correct it? I tried escaping the ? by using \? but that didn't work. Quote Link to comment https://forums.phpfreaks.com/topic/73352-solved-having-troubles/ Share on other sites More sharing options...
SharkBait Posted October 16, 2007 Author Share Posted October 16, 2007 Ah what I was looking for was to keep the query string intac as i passed it to another page. RewriteCond ^{QUERY_STRING} ^m=show&id=([0-9]+)$ RewriteRule ^ index2.php All works now It is because of the question mark that I want to keep it will see it as a URL query. Quote Link to comment https://forums.phpfreaks.com/topic/73352-solved-having-troubles/#findComment-370942 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.