我将查询直接发送到我的域example.com/?s=Xy1Ab
(S是随机的,像Xy1Ab一样长5个字符),但我希望DirectoryIndex是index.html,但我想将此查询字符串重定向到index.php但它似乎不起作用。
DirectoryIndex index.html
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{QUERY_STRING} ^s=(.*?){5}
RewriteRule ^(.*)$ /index.php?s=%1? [R=302,L]