
February 19th, 2013, 08:40 AM
|
|
Registered User
|
|
Join Date: Feb 2013
Posts: 3
Time spent in forums: 6 h 41 m 8 sec
Reputation Power: 0
|
|
Quote: | Originally Posted by ManiacDan str_replace replaces strings, but explain why you can't use mod rewrite? |
Dont know just wont work, I use this rule
RewriteRule ^(/?id=*/[^/]*?)_([^/]*?_[^/]*)$ $1-$2 [N]
RewriteRule ^(/?id=*/[^/]*?)_([^/_]*)$ $1-$2 [R=301]
and thing is that my url does not change, there is still %20, but funny thing is that when I manualy change %20 to - in url and hits Enter, URL is fine with -
With php I have also tried with str_replace or pereg_replace, weather I make it as function or not, I can not make it work just with single link
<a href="item.php?id=<?=$values[$i]['itemid']?>&<?=$values[$i]['itemname']?>
|