在wordpress 4.4设置中,我无法将关键字重定向到搜索页面。我试图实现的是重写/重定向
www.site.com/**search+keyword.html***
至www.site.com/**?s=search+keyword&submit=Search
我已经尝试了在谷歌找到的每一个解决方案,但没有一个适用于这个版本。.htaccess文件:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /wordpress/
RewriteRule ^index\\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /wordpress/index.php [L]
RewriteRule ([^/]+)\\.html$ ./?s=$1 [L]
</IfModule>
我可以使用以下方式搜索wordpress:http://localhost/wordpress/search/keyword
, 但我无法更改搜索URL。我需要的是,每当有关键字后跟.html
在URL中。我怎样才能做到这一点?