0

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.

1
0

Welcome 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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.