• ejm

    (@llizard)


    Looking at my 404 log, I see that some visitors are mistakenly tacking “recipes” onto the end of my wp folder name “blog”. I have tried (and failed) to add a redirect via cpanel.

    So I tried directly adding the following above all the ithemes security coding in the htaccess file for the wp folder. Alas, it didn’t work.

    # trying to redirect /blog/recipes to /recipes
    RewriteCond %{HTTP_HOST} !^$
    RewriteCond %{HTTP_HOST} !^\blog\recipes\$ [NC]
    RewriteRule ^/(.*)$ http://mydomain.com/recipes/$1 [L,R=301]

    htaccess coding makes me shudder. There seem to be so many variables. For anyone who actually understands htaccess coding, I would like a wildcard redirect from /blog/recipes/ to /recipes/

    Please advise how I can achieve this. Thank you.

    E Morris, etherwork [dot] net [slash] blog <<purposely unlinked in attempt to keep spammers at bay (there’s a really good reason that I have iThemes Security plugin. Thanks, guys, for helping to rid me of the bruteforce attacks)

    https://wordpress.org/plugins/better-wp-security/

  • The topic ‘redirects not working’ is closed to new replies.