imperium2335 Posted September 28, 2011 Share Posted September 28, 2011 Hi, I have the following: RewriteRule dog-toys/toy-(.*)-(.*)\.html$ product-type.php?type=$1&cate=$2 The problem is, that the 2nd variable (cate) contains one or more '-'. e.g. a link could look like this: dog-toys/toy-ball-large-balls\.html How do I get htacces to match everything except '-'? Have tried (.*[^-]) which doesn't do anything. Please help! Link to comment https://forums.phpfreaks.com/topic/248031-htaccess-match-problem/ Share on other sites More sharing options...
MarPlo Posted September 29, 2011 Share Posted September 29, 2011 Hy, Try this code: RewriteRule dog-toys/toy-([^-]+)-([A-Za-z0-9_-]+).html$ product-type.php?type=$1&cate=$2 Link to comment https://forums.phpfreaks.com/topic/248031-htaccess-match-problem/#findComment-1274049 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.