我写.htaccess文件如下生成错误:htaccess的:(。),如果点查询字符串中存在
Options +FollowSymLinks
RewriteEngine On
#open the product details page with the Product Number with PN prefix
RewriteRule ^((products/|product/|)PN[0-9-]+)/?$ product.php?pno=$1
#open the product search page for a particular category
RewriteRule ^((bat|ref|acc)[A-Za-z0-9-]+)/?$ search.php?cat=$1 [NC]
#open the product search page for a particular category
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([A-Za-z0-9-_.,]+)/?$ search.php?search =$1 [NC]
RewriteRule !\.(html|php)$ - [S=4]
RewriteRule ^([^_]*)_([^_]*)_([^_]*)_([^_]*)_(.*)$ $1-$2-$3-$4-$5 [E=uscor:Yes]
RewriteRule ^([^_]*)_([^_]*)_([^_]*)_(.*)$ $1-$2-$3-$4 [E=uscor:Yes]
RewriteRule ^([^_]*)_([^_]*)_(.*)$ $1-$2-$3 [E=uscor:Yes]
RewriteRule ^([^_]*)_(.*)$ $1-$2 [E=uscor:Yes]
RewriteCond %{ENV:uscor} ^Yes$
如果在该点无法接受()。查询字符串值。现在,它已经解决,但不能接受其先前的规则。
此外,如果给出URL“URL/products/PN123”或“URL/product/PN123”,我希望它正确地重写“URL/product.php?pno = PN123”。请注意,如果“URL/PN123”用正确的CSS正确地给了它可以正确重定向。和“URL /产品/ PN123”,也可以检索数据,但不能prperly显示CSS。
什么发送'找不到对象?'search.php查询? – 2012-02-16 13:43:45
你能不能在角色类中加一个点? '^([A-Za-z0-9 -_。] +)/?$' – 2012-02-16 13:44:25
@Michael,我加了一个小点,但没有奏效。在这种情况下,它将变成空白页而不是错误消息。 – Agilox 2012-02-16 13:57:07