Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author John Godley

    (@johnny5)

    Thread Starter caroline

    (@makeupedia)

    Thank you @johnny5 for quick answer!

    I’m a total newbie, but I’ve changed the following:

    from /^/category/.* to /^/kategori/.*

    from /^/tag/.* to /^/tagg/.*

    I also checked the box for regular expressions and ignorance between lower and uppercase letters.

    So does this three steps means I don’t have to do anything with this line:
    /kategori/recensioner/?

    Plugin Author John Godley

    (@johnny5)

    You shouldn’t have the double slashes there. /^/ is incorrect and ^/ is correct. You can use https://regex101.com to test your expression.

    Thread Starter caroline

    (@makeupedia)

    Yes I’ve changed it and tested around, I got results from google like "https://www.mysite.com/tagg/kategori/tagg/kategori/tagg/kategori/tagg/kategori/tagg/kategori/tagg/kategori/tagg/kategori/tagg/kategori/tagg/.*" I’m not familiar with the regex101.com, what do I insert in the “Test string” field?

    But I guess it works now so I’m glad for that, I use these now:

    ^/category/(.*)
    /kategori/$1

    and

    ^/tag/(.*)
    /tagg/$1

    Next step for me is to add back “kategori” right after mysite.com/ for pages within the category taxonomy.
    For example, right now Google redirects
    https://www.mysite.com/varumarken/batiste to https://www.mysite.com/%postname%
    I want it to be https://www.mysite.com/kategori/varumarken/batiste

    Is this even possible since the taxonomy name (category/kategori) are both changed and redirected now?

    Thank you @johnny5 !

    Plugin Author John Godley

    (@johnny5)

    I don’t understand your last question. Google doesn’t redirect anything – it is your site that does the redirecting.

    Thread Starter caroline

    (@makeupedia)

    Ah ok so I meant if a google result show this url for example:
    mysite.com/varumarken

    Instead I want redirection to:
    mysite.com/kategori/varumarken
    I want to re-add kategori (category) before the taxonomy.

    The following worked nice for the term recensioner, but it doesn’t work for varumarken. Any idea why?

    Working:

    
    ^/recensioner/(.*)
    /kategori/recensioner/$1

    Not working:

    
    ^/varumarken/(.*)
    /kategori/varumarken/$1
    Plugin Author John Godley

    (@johnny5)

    Can you provide a real URL that isn’t working?

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Redirects from google searches’ is closed to new replies.