Mark
Mark

Reputation: 69920

mod_rewrite - how to rewrite an URL?

Is there a way to rewrite an URL like

http://mydomain.com/getProduct.php?id=1&mode=simple

in

http://mydomain.com/products/1/simple

using mod_rewrite in Apache2?

Upvotes: 0

Views: 563

Answers (1)

Simon
Simon

Reputation: 4585

RewriteRule /products/([0-9]+)/([a-z]+) /getProduct.php?id=$1&mode=$2

For more information search google for mod_rewrite tutorials.

Upvotes: 4

Related Questions