I like to rewrite the URL
RewriteRule ^ Mobiles / (. *) $ / Mobile_rating.php? Alias = $ 1 [L, B] Which works well for me
/ mobile / nokia70 / mobile_rating.php? Alias = Nokia70 me
/ mobile / nokia70 /mobile_rating.php?alias=nokia70&product=mobiles < P> I have to say that the mobile should be replaced in the url as the product should be changed to mobile .. how do i do it .. no suggestions
If you mean that the product variable is determined by the first part of the URL, do this GA:
RewriteRule ^ (. *) / (. *) $ /mobile_rating.php?alias=$2&product=$1 [L, B] However, I will change the alphabet from . * rewrite / mobile / nokia70 / abc to /mobile_rating.php?alias=abc&product=mobiles/nokia70 above for some less generic Will happen.
[^ /] + will match that string with no forward slash, or if you are always using a strict set of letters / numbers, then [A-z0-9 -] Try + which will match any lowercase letters, digits, or hyphen.
Comments
Post a Comment