在您的.htaccess
在<IfModule mod_rewrite.c>
标签:
RewriteCond %{QUERY_STRING} (^|&)(.*)
RewriteRule ^(.*)$ /?s=%2 [R=301,L]
基于默认值
.htaccess
由WordPress生成,现在在自定义
RewriteRule
:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# Custom Rules
RewriteCond %{QUERY_STRING} (^|&)(.*)
RewriteRule ^(.*)$ /?s=%2 [R=301,L]
</IfModule>