admin管理员组文章数量:1290971
I have URL-friendly filtering plugin enabled (WP Grid Builder) and I want to utilise this for the category archive page.
I want to redirect an archive page /
to /?_tag_thoughts=branding
with tag_thoughts
being the Facet's name and =branding
being the category. Note: those are real working URLs.
I don't mind using a redirection plugin or even a custom PHP redirection code. Any help is appreciated.
I have URL-friendly filtering plugin enabled (WP Grid Builder) and I want to utilise this for the category archive page.
I want to redirect an archive page https://tag.alfian.co/blog/category/branding/
to https://tag.alfian.co/blog/?_tag_thoughts=branding
with tag_thoughts
being the Facet's name and =branding
being the category. Note: those are real working URLs.
I don't mind using a redirection plugin or even a custom PHP redirection code. Any help is appreciated.
Share Improve this question asked Jun 9, 2021 at 4:45 aahlfeeyannaahlfeeyann 11 bronze badge 1- The plugin Redirection is good for this kind of thing if you don't want to use code. wordpress/plugins/redirection – Michelle Commented Jun 9, 2021 at 18:54
1 Answer
Reset to default 0Welcome aboard,
This should be made with the PHP rewrite rule in WordPress functions, but if you don't want to use PHP, you can use the .htaccess
redirection.
RewriteRule ^blog/category/(.*)$ /blog/?_tag_thoughts=$1 [R=301,NC,L]
Change WordPress .htaccess code with code below
# BEGIN WordPress
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteRule ^blog/category/(.*)$ /blog/?_tag_thoughts=$1 [R=301,NC,L]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# END WordPress
本文标签: filtersRedirect an archive page to its relevant URLfriendly filtered page
版权声明:本文标题:filters - Redirect an archive page to its relevant URL-friendly filtered page 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741514921a2382827.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论