服务器未拾取重写规则

Rewrite Rules are not being picked up by the Server

我不确定为什么 mod_rewrite.c 没有正确地指向 link

例子URL

http://developer.prodev/dev_www_trunk/justink/public_html/search/manufacturer/hewlett-packard

重写引擎

http://developer.prodev/dev_www_trunk/justink/public_html/search/index.php?advanced=0&manufacturer_rewrite=hewlett-packard

我已经在 htaccess tester

上测试了我的重写规则

但这不是相同的结果,我在我的 error_log.log 中得到了重定向到 justink/search/manufacturer/...public_html 不属于重写)。

# dev_www_trunk/justink/public_html/search/manufacturer/hewlett-packard 
RewriteRule ^(dev_[^/]*)/justink/public_html/search/manufacturer/?(.*)$ //justink/public_html/search/index.php?advanced=0&manufacturer_rewrite=%{QUERY_STRING} [L]

来自日志:

'^(dev_[^/]*)/justink/public_html/search/manufacturer/?(.*)$' to uri 'search/manufacturer/hewlett-packard'

您的正则表达式中的前缀信息过多。如您所见,提供给正则表达式的 URL 仅为

'search/manufacturer/hewlett-packard'

我相信您还想重定向到新的 HTTP 位置而不是文件,以便您的 mod_phpphp-fpm 解释您的重定向请求:

RewriteRule /search/manufacturer/?(.*)$ http://%{HTTP_HOST}/search/index.php?advanced=0&manufacturer_rewrite=%{QUERY_STRING} [L]