[英]RewriteRule cannot compile regular expression in VPS
My previous server working fine. 我以前的服务器工作正常。 Today I changed new server and getting RewriteRule cannot compile regular expression on my htaccess.
今天,我更换了新服务器,并且RewriteRule无法在htaccess上编译正则表达式。
How to fix this line 如何修复这条线
RewriteRule ^([a-zA-Z0-9_-\s\$\:\!\?\[\]\(\)\'\"]+)$ %{QUERY_STRING}?file=$1 [L]
This is rule which rewrite all page to index.php file. 这是将所有页面重写为index.php文件的规则。 I am using Apache 2.2.29.
我正在使用Apache 2.2.29。 Thank you !
谢谢 !
Your regex indeed looks suspect, try this rule: 您的正则表达式确实看起来很可疑,请尝试以下规则:
RewriteRule ^([][\w\s$:!()'"-]+)/?$ ?file=$1 [L,QSA]
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.