0

i want to change this url

http://localhost/ramadel/view/product.php?product=71

to

http://localhost/ramadel/view/product/71

here is my htaccess code:

RewriteEngine on RewriteRule ^/?product/([0-9]+)$ /product.php?product=$1

and rewrite model in httdp.conf is uncommented too.

any idea?

  • 1
    Possible duplicate of [Reference: mod\_rewrite, URL rewriting and "pretty links" explained](https://stackoverflow.com/questions/20563772/reference-mod-rewrite-url-rewriting-and-pretty-links-explained) – Jason Bassett Jun 10 '17 at 13:20

1 Answers1

0

I'm not the best at .htaccess in general, kinda learning myself. Give this a try, got flags to make case insensitive

RewriteRule ^product/([0-9]+)/?$ product.php?product=$1 [NC,L]
Liam Allan
  • 1,109
  • 1
  • 7
  • 12