nikefido Posted November 19, 2009 Share Posted November 19, 2009 For a URL rewrite. I'm trying to match something like: /press/name-of-article-19 and map it to /press/?=19 RewriteRule ^press/(.+)-([0-9]+)$ /press/?=$2 See anything wrong here? ^press/(.+)(-[0-9]+)$ ? Quote Link to comment https://forums.phpfreaks.com/topic/182205-trying-to-match-a-url-with-no-success/ Share on other sites More sharing options...
cags Posted November 19, 2009 Share Posted November 19, 2009 The pattern your matching looks correct, the pattern your forwarding doesn't. I think you want something more like this... RewriteRule ^press/(.+)-([0-9]+)$ /press/?id=$2 Quote Link to comment https://forums.phpfreaks.com/topic/182205-trying-to-match-a-url-with-no-success/#findComment-961450 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.