【发布时间】:2015-01-30 18:44:12
【问题描述】:
我以前的服务器工作正常。今天我换了新服务器,发现 RewriteRule 无法在我的 htaccess 上编译正则表达式。
如何修复这条线
RewriteRule ^([a-zA-Z0-9_-\s\$\:\!\?\[\]\(\)\'\"]+)$ %{QUERY_STRING}?file=$1 [L]
这是将所有页面重写为 index.php 文件的规则。我正在使用 Apache 2.2.29。谢谢!
【问题讨论】:
标签: php regex apache .htaccess mod-rewrite