i am using '-'separater in htaccess.
here is my code

htaccess url:http://rahul/cellbatts/featured products-<?=$fetchhotproducts[itemno]?>
RewriteRule ^([^-]*)-([a-zA-Z0-9/_-]+[^.]+)$ product_info.php?catname=$1&itemno=$2 [NC]
above is working for this example
http://rahul/cellbatts/product_info.php?catname=featured products&&itemno=HA-MO-V9
but my item number is some types like this
http://rahul/cellbatts/product_info.php?catname=featured products&&itemno=HA-MO-VK-KL/1
for this the above htaccess url is not working? redirecting to correct page but images are not displaying in only this situation(HA-MO-VK-KL/1). i think '/' problem. how to do for this?

Edited by muralikalpana: n/a

7 Years
Discussion Span
Last Post by SikoSoft

In your rewrite rule, have you tried to escape the forward slash, like so:

RewriteRule ^([^-]*)-([a-zA-Z0-9\/_-]+[^.]+)$ product_info.php?catname=$1&itemno=$2 [NC]

That could do it - I can't say for certain since I don't believe I've ever used forward slashes in rewrite rule regular expressions, but I do know that in most languages and contexts they need to be escaped.

It could also be because you are confusing the web server into thinking what follows the forward slash is a new sub-directory.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.