为什么80%的码农都做不了架构师?>>>
https://www.drupal.org/project/commerce_product_urls
For each product it provides id parameter, for example:
http://www.mycommercesite.com/node/1?id=1
http://www.mycommercesite.com/node/1?id=2
as well as sku parameter, for example:
http://www.mycommercesite.com/node/1?sku=pr1
http://www.mycommercesite.com/node/1?sku=pr2
Sad Original URL = site.com/node/1?id=54
Happy URL :) = site.com/node/1/rueben-sandwich/
Use mod_rewrite in your .htaccess file to parse out the elements of the URL. Like this:
RewriteEngine On //check that in drupal's .htaccess the rewrite engine is on by default
RewriteRule /(.*)/$ node/.*$?id=$1