Php 通过.htaccess搜索引擎优化友好的URL参数

Php 通过.htaccess搜索引擎优化友好的URL参数,php,apache,.htaccess,mod-rewrite,Php,Apache,.htaccess,Mod Rewrite,我想重写以下网址: https://www.example.com/bibliorafturi/?wpsolr_fq%5B0%5D=pa_culoare_str%3AAlbastru https://www.example.com/bibliorafturi/?wpsolr_fq%5B0%5D=pa_culoare_str%3AAlbastru&wpsolr_fq%5B1%5D=pa_brand_str%3AESSELTE 为此: https://www.example.com/bi

我想重写以下网址:

https://www.example.com/bibliorafturi/?wpsolr_fq%5B0%5D=pa_culoare_str%3AAlbastru
https://www.example.com/bibliorafturi/?wpsolr_fq%5B0%5D=pa_culoare_str%3AAlbastru&wpsolr_fq%5B1%5D=pa_brand_str%3AESSELTE
为此:

https://www.example.com/bibliorafturi/Albastru
另一个例子:

https://www.example.com/bibliorafturi/?wpsolr_fq%5B0%5D=pa_culoare_str%3AAlbastru
https://www.example.com/bibliorafturi/?wpsolr_fq%5B0%5D=pa_culoare_str%3AAlbastru&wpsolr_fq%5B1%5D=pa_brand_str%3AESSELTE
对此

https://www.example.com/bibliorafturi/Albastru/?wpsolr_fq%5B1%5D=pa_brand_str%3AESSELTE
因此,我只需要一个简单的搜索引擎优化友好

如何使用.htaccess执行此操作

更新:

这是我的.htaccess文件:

# BEGIN WordPress
<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{REQUEST_URI} /(.*)/(.*)/(.*)/?$
    RewriteRule ^ /%1?wpsolr_fq[%3]=pa_culoare_str:%2 [QSA,L]
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
</IfModule>
#开始WordPress
重新启动发动机
重写条件%{REQUEST_URI}/(.*)/(.*)/(.*)/(.*)/$
重写规则^/%1?wpsolr_fq[%3]=路径:%2[QSA,L]
重写基/
重写规则^index\.php$-[L]
重写cond%{REQUEST_FILENAME}-F
重写cond%{REQUEST_FILENAME}-D
重写规则/index.php[L]

谢谢大家!

只是在寻找答案时要记住的东西。。。其实情况正好相反。您希望将漂亮、友好的URL重新写入应用程序可以轻松解析的内容。如中所示,友好的URL出现在请求中,您可以在web服务器中将其重写为应用程序所期望的格式。您应该使用wp_重写插件来实现它。我认为这是wordpress重写。