• Resolved cbigler

    (@cbigler)


    We are swapping domains soon, so that our main domain works on our new WordPress / Woocommerce website.

    It is coming from an older ASP (.aspx filenames) website with dynamic URLs using a handful of variables such as:
    ?pid=101 (for product ID)
    ?cat=101 (for category ID)
    ?currentpage=1 (for pagination)
    ?tlmc=1 (no fricken clue what this was for)

    Also, the indexed URLs on Google include ending slash ‘/’ and some do not include it … for the same URL.

    How will it work in this scenario? I’m assuming it won’t work.

    That said, is it possibly to put in a specific code snippet for each reported 404 error with your plugin that would be added to .htaccess … or should I just do this manually.

    An example hardcoded redirect which works for me is shown below, and I’m wondering if your plugin can handle this?

    Example Old Dynamic URL for Blue Pens:
    https://domain.com/products/category-name.aspx?cat=613

    Example New Friendly “SEO” URL for Blue Pens:
    https://domain.com/products/category/pens/blue-pens/

    301 Redirect:
    RewriteEngine on
    RewriteCond %{QUERY_STRING} cat=613
    RewriteRule ^$ /products/category/pens/blue-pens/? [L,R=301]

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

    (@johnny5)

    You can add a redirect from any source URL to any target URL. Yes your example above will work

    I’m not sure I understand what you mean about a 404 code snippet

Viewing 1 replies (of 1 total)
  • The topic ‘301 redirects from dynamic url to sef url’ is closed to new replies.