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! Quote 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 Quote Link to comment https://forums.phpfreaks.com/topic/248031-htaccess-match-problem/#findComment-1274049 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.