你能帮我用htaccess重定向这个url https://www.theholisticsanctuary.com/?s=%7Bsearch_term_string%7D到主页吗?我试过用排名数学重定向,但没有运气。我试过了,但恐怕是错的。
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{QUERY_STRING} ^s=%7Bsearch_term_string%7D
RewriteRule ^https://www.theholisticsanctuary.com/? [R=301,L]
</IfModule>
你差一点!
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{QUERY_STRING} ^s=%7Bsearch_term_string%7D
RewriteRule ^(.*) https://www.theholisticsanctuary.com/$1 [R=301,L,QSA]
</IfModule>