我有我应如何构建我的产品列表页面,页面的产品,网页的问题。mod_rewrite的电子商务URL设计
它大致翻译成这样:
/bags/nicebag.html
=/product.php?product=nicebag&category=bags
/nicebag.html
=/product.php?product=nice_bag
/bags
=productlisting.php?&category=bags
问题是,网页将共享相同的URL的结构二号在列表中 /contact.html
= page.php?page=contact
为什么它没有在.htaccess上市separatly是网页可以有不同的名称的原因。甚至同一页面可以使用多种语言。
没有原因。 1和2没有组合,是否有时我只想参考产品,因为它可以分为多个类别。
你的建议是什么样的结构?
的.htaccess
# Mod rewrite enabled.
Options +FollowSymLinks
RewriteEngine on
# ---- Rules ----
# product.php (Search for category & product name)
RewriteRule ^([A-Za-z0-9-_]+)/([A-Za-z0-9-_]+)\.html?$ product.php?prod_id=$2&cid=$1 [NC,L]
# productlisting.php (Search for category)
RewriteRule ^([A-Za-z0-9-_]+)?$ productlisting.php?&cid=$1 [NC,L]
这也是我的想法,我会一起去的 – Cudos 2009-08-31 13:32:22
欢呼声,有一个球 – 2009-08-31 19:32:21