WordPress.org

Ready to get started?Download WordPress

Forums

Redirection
Redirection to Target URL containing Query String (4 posts)

  1. RobertKCole
    Member
    Posted 1 year ago #

    Relaunched a website form an architecture where WordPress only supported the blog, to a new structure where wordpress supports the full site.

    Trying to redirect old blog archives to new archives that comprise three categories - here is an example:

    Desired Redirect -

    Source URL: sitename.com/blog/2012/09
    Target URL: sitename.com/2012/09/?cat=306,10,11

    Have tried various fixes with no success = Obviously I am doing something wrong with the Regex code as the special characters are being translated to create to an incorrect URL like:

    sitename.com/2012/03/FcatD306C10C11

    Can someone please let me know how to define the Target URL to maintain the integrity of the category filter in the query string?

    http://wordpress.org/extend/plugins/redirection/

  2. djbokka
    Member
    Posted 1 year ago #

    +1

  3. grosbouff
    Member
    Posted 1 year ago #

    +1

  4. Jesús Franco
    Member
    Posted 1 year ago #

    I really don't know how to achieve that with redirection plugin, however with a RewriteRule you could try something like:

    RewriteCond %{REQUEST_URI} ^blog/([0-9]*)/([0-9]*)/?$
    RewriteRule ^blog/([0-9]*)/([0-9]*)/?$ $1/$2/?cat=306,10,11 [L,QSA]

    http://wiki.apache.org/httpd/RewriteFlags/QSA

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic