MOD改写域后,一切都变成GET一切都、MOD、GET

2023-09-02 00:38:39 作者:信求,咱狠爱

我怎么能改写域名之后一切都变成得到,如果它是不是已经得到?

例如:example.com/blah/blah.blah

将成为example.com/?blah/blah.blah

基本上所有我想要做的就是添加一个?后的第一前锋,如果心不是1已经凶多吉少。

谢谢!

解决方案

 的RewriteCond%{} REQUEST_FILENAME!-f
重写规则。* /index.php?$0 [QSA]
 

但这种方法有一些问题,@ anubhava的比较好; - )

他用1000小时制作的Mod,几乎把 黑暗之魂 重制了一遍

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 ;-)

 
精彩推荐