我在 apache 日志中收到以下错误
文件不存在:D:/wamp/www/script/products,引用者:http://localhost/script/products/category/product-123.html每当以下 url localhost/script/products/category/product-123.html 都通过此重写规则进行解析 RewriteRule ^products/([~A-Za-z0-9-"]+)/([~A-Za-z0-9-".]+).html$ index.php?page_type=products&prod=$2 [L].
脚本和规则运行正常,但我在 apache 错误日志中收到该错误。我已激活 RewriteLog,但 rewrite.log 文件中没有任何内容。它是空的。请帮忙,提前致谢。
答案1
尝试:
RewriteRule ^/script/products/([~A-Za-z0-9-"]+)/([~A-Za-z0-9-".]+).html$ index.php?page_type=products&prod=$2 [L]