smith.james0 Posted January 14, 2014 Share Posted January 14, 2014 I am using the following code RewriteCond %{QUERY_STRING} id=(\d+) RewriteRule included/bee\.php$ http://www.beekeepinglinks.co.uk/bee.php?ID=%1 [R=301,L] RewriteCond %{QUERY_STRING} Category2=(\d+) RewriteRule categories\.php$ http://www.beekeepinglinks.co.uk/categories.php?Category=%1 [R=301,L] The second statement wont work, but I can not understand why, can anyone help? James Quote Link to comment https://forums.phpfreaks.com/topic/285373-probably-something-easy/ Share on other sites More sharing options...
requinix Posted January 14, 2014 Share Posted January 14, 2014 What URL are you trying to access and how does it "not work"? Quote Link to comment https://forums.phpfreaks.com/topic/285373-probably-something-easy/#findComment-1465279 Share on other sites More sharing options...
smith.james0 Posted January 14, 2014 Author Share Posted January 14, 2014 I wish to change http://www.beekeepinglinks.co.uk/categories.php?Category2=Education to http://www.beekeepinglinks.co.uk/categories.php?Category=Education James Quote Link to comment https://forums.phpfreaks.com/topic/285373-probably-something-easy/#findComment-1465287 Share on other sites More sharing options...
requinix Posted January 14, 2014 Share Posted January 14, 2014 Well, "Education" certainly won't match against "\d+"... Quote Link to comment https://forums.phpfreaks.com/topic/285373-probably-something-easy/#findComment-1465295 Share on other sites More sharing options...
smith.james0 Posted January 15, 2014 Author Share Posted January 15, 2014 I have tried Category2=(.*\D) and it works, thanks for pointing that out James Quote Link to comment https://forums.phpfreaks.com/topic/285373-probably-something-easy/#findComment-1465317 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.