我怎么能改写域名之后一切都变成得到,如果它是不是已经得到?
例如:example.com/blah/blah.blah
将成为example.com/?blah/blah.blah
基本上所有我想要做的就是添加一个?后的第一前锋,如果心不是1已经凶多吉少。
谢谢!
解决方案 的RewriteCond%{} REQUEST_FILENAME!-f
重写规则。* /index.php?$0 [QSA]
但这种方法有一些问题,@ anubhava的比较好; - )
How can I rewrite everything after the domain name into get if it is not already get?
For example : example.com/blah/blah.blah
will become example.com/?blah/blah.blah
basically all I want to do is add a ? after the first forward slash if there isnt one already.
Thanks!
解决方案RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule .* /index.php?$0 [QSA]
But this solution has some issues, @anubhava's is better ;-)