johnnyjohnny Posted August 6, 2009 Share Posted August 6, 2009 How to convert "media/browse?key=hello" to "control/media?r=browse&key=hello"? Thanks in advance. Tried: RewriteRule ^([^/]+)/([^/]+)?([^/]+)$ control/$1?request=$2&$4 [L] Didn't work out. Quote Link to comment https://forums.phpfreaks.com/topic/169104-help-rewriterule/ Share on other sites More sharing options...
dreamwest Posted August 7, 2009 Share Posted August 7, 2009 You have a ? in your fake url , your real url has no extension ($1?request) Personally i would reduce it to: RewriteRule ^mediakey=([^/]+) control/browse.php?request=browse&key=$1 [L] or RewriteRule ^media/key=([^/]+) control/browse.php?request=browse&key=$1 [L] Quote Link to comment https://forums.phpfreaks.com/topic/169104-help-rewriterule/#findComment-892798 Share on other sites More sharing options...
johnnyjohnny Posted August 7, 2009 Author Share Posted August 7, 2009 I meant to ask how to convert "media/browse?key=hello" to "control/media?request=browse&key=hello"? And what i have now is: RewriteRule ^([^/]+)/([^/]+)?([^/]+)$ control/$1?request=$2&$3 [L] Quote Link to comment https://forums.phpfreaks.com/topic/169104-help-rewriterule/#findComment-893185 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.