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]+)$ ? 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 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
Archived
This topic is now archived and is closed to further replies.