0
道歉,但我的URL重写的知识是有限的!障碍.htaccess
我所建立的网址reqwrite我们的每一个在我们的电子商务商店类别。
我有一种感觉,我设置此功能非常长篇大论的方式,将别人的头脑检查我有这样做的正确方法?
理想情况下,我们希望在各级对我们所有类别只字类别 - 而不是工具 - 列表 - 和timber-,但我不能想出一个办法做到这一点没有重定向导致错误。
这里是我们htaccess-:
RewriteEngine On
RewriteBase/
RewriteCond %{HTTP_HOST} !^www.xxxx.co.uk$ [NC]
RewriteRule ^(.*)$ http://www.xxxx.co.uk/$1 [L,R=301]
RewriteRule Product-(.*)-(.*)-(.*)-(.*)-(.*)-(.*)\.html$ /Details.cfm?Name=$1&ProdID=$2&category=$3&secondary=$4&third=$5&brand=$6 [NC]
RewriteRule Brands-(.*)-(.*)\.html$ /Results.cfm?bname=$1&brand=$2 [NC]
RewriteRule Tools-(.*)-(.*)\.html$ /subcat.cfm?category=$2-$1&secondary=$3 [NC]
RewriteRule Timber-(.*)-(.*)\.html$ /subsubcat.cfm?category=56&secondary=$2-$1 [NC]
RewriteRule Category-(.*)-(.*)-(.*)-(.*)\.html$ /subsubcat.cfm?category=$3&secondary=$2-$1
RewriteRule List-(.*)-(.*)-(.*)-(.*)-(.*)\.html$ /Results.cfm?category=$1&secondary=$3&third=$2-$4
RewriteRule ([^\s]+)\s(.*) $1-$2 [NC,LP,R=301]
*//RewriteBase/
*//RewriteRule ^(.*)%20(.*)$ $1-$2 [LP,R=301,L]
RewriteRule Festool-(.*)-(.*)\.html$ /SubCat.cfm?category=$1&secondary=$2
RewriteRule Lie_nielsen-(.*)-(.*)\.html$ /SubCat.cfm?category=$1&secondary=$2
任何帮助将是巨大的!
干杯,
谢谢你们的帮助,汝拉,我会读今晚并给它明天一试。我会让你知道发生了什么! – matthew 2012-02-13 16:40:04