Jump to content

.htaccess match problem


imperium2335

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.