• Resolved knittingand

    (@knittingand)


    I’ve just merged 2 very old websites wtih 4 wordpress installations and a bunch of html files into a single WordPress installation and am having trouble with some of my redirects.

    One of my old wordpress installations had urls with capital letters because it was based on an old wiki. I am writing all my redirects in the .htaccess file.

    I need to force all the urls to lowercase before redirecting them to the new pages, and redirect the pages with or without the trailing forward slash.

    For expample:
    http://www.knitting-and.com/wiki/Picot_Hem
    http://www.knitting-and.com/wiki/Picot_Hem/
    http://www.knitting-and.com/wiki/picot_hem
    and
    http://www.knitting-and.com/wiki/picot_hem/

    all need to redirect to
    https://www.knitting-and.com/crafts-and-needlework/knitting/tips/picot_hem/

    without having to write them all out separately. This is just one of many files.
    My other redirects (the .html ones) are all working fine, and I have the whole new WordPress installation working perfectly under https. It’s just these redirects that aren’t working the way I need them to.

    I tried the instructions at https://www.askapache.com/htaccess/rewrite-uppercase-lowercase/
    but somehow it truncated my .htaccess file and nothing would work. I had to upload my backup to fix it.

Viewing 1 replies (of 1 total)
  • Thread Starter knittingand

    (@knittingand)

    I have found a plugin to help with the capitalisation problem, just looking for a solution to the trailing slash problem.

Viewing 1 replies (of 1 total)

The topic ‘Force urls to lowercase when redirecting’ is closed to new replies.