September 22, 201312 yr Hi all, i have written a custom shopping cart and i just need the urls to be friendy i have the following url oakfurniture.dev/oak-furniture.php?oak-furniture=BROOKLYN-OAK-4-DRAWER-CHEST i would like it to be oak-furniture.dev/oak-furniture/BROOKLYN-OAK-4-DRAWER-CHEST i have in my .htaccess Options +FollowSymLinks RewriteEngine on RewriteRule ^oak-furniture/(.*)$ /oak-furniture.php?id=$1 and i have restarted apache can anyone help with this thanks
September 22, 201312 yr You didn't say there was an error? Add something like print_r($_GET) or var_dump($_GET) and see if the variable is being passed though. In your original call you say ?oak-furniture= whereas your .htaccess file says ?id=
September 22, 201312 yr Author You didn't say there was an error? Add something like print_r($_GET) or var_dump($_GET) and see if the variable is being passed though. In your original call you say ?oak-furniture= whereas your .htaccess file says ?id= Hi thanks for pointing it out i am getting this error now Notice: Undefined index: oak-furniture in
September 22, 201312 yr Author RewriteEngine On RewriteRule ^oak-furniture/([A-Za-z0-9-]+)/?$ oak-furniture.php?oak-furniture=$1 [NC] this worked for me thanks for pointing out my copy and paste error
Create an account or sign in to comment