• Resolved ria_amp

    (@ria_amp)


    Hi,

    I found this wonderful plugin when I discovered that that I have some 245 crawl errors.. There are various reasons…

    My query.

    Seems like there oughta be a way to have a whole bunch of errors that all start with the same character string (for instance “/download……) but have different numbers of characters after the initial word be redirected with a simple piece of code in the .htaccess file. But I can’t find any help on the web. I’m not a coder but a smart computer user. And yes, I’ve manipulated my functions file with PHP. Any help? Am I clear?
    Thanks
    Annamarie

    https://www.ads-software.com/plugins/quick-pagepost-redirect-plugin/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter ria_amp

    (@ria_amp)

    Ah ha! “regular expressions” or regex. I have some learning to do.

    Ria_Amp,
    Hello again! Yes, regex is short for ‘regular expression’.
    This plugin does not have a ‘wildcard’ or ‘regex’ redirects feature. It is intended for simple redirects where you do not need to do a lot of ‘patterned redirects’ (which is what you described). When you have something like you mention, where you have a lot of redirects that are very similar in nature, and easily fit a a URL pattern, then an .htaccess redirect is the best course of action. For example, if you have a lot of URLs that are like https://yoursite.com/something/page-name-one/ and https://yoursite.com/something/page-name-two/ and they will be redirecting to https://yournewsite.com/something-else/page-name-one/ and https://yournewsite.com/something-else/page-name-two/ (note the slight difference, but there is a pattern), then .htaccess can easily redirect ALL of them with a regex pattern (something like RewriteRule ^something/(.*)$ /something-else/$1 [R=301,L], would match all of those patterns in one line of code). Note this is just an example and not meant to be a working line of code!

    The plugin does not modify the .htaccess file, so you would either need to do that yourself or find a plugin to help you do that. Just keep in mind that many times the .htaccess file is locked and plugins will not have access to modify the .htaccess file – but if WordPress can write to the .htaccess file when adding permalinks, then a plugin will be able to as well.

    Hope this makes sense.
    Warm regards,
    Don

    Thread Starter ria_amp

    (@ria_amp)

    Yes indeedy that makes lots of sense. It is what I thought. Once I found a tutorial on regular expressions and started reading, I decided that I’d spend more time twisting my head around learning the codes than what I need to simply use your oh-so-very-nice plug in one by one. Using Excel to delete parts and Alfred’s (Mac) nice copy and paste memory and I’ll grunt through my 240 or so redirects. And THEN I’ll be smart in the future about changing names of posts and page and deleting pages.

    Good to know that the plug in doesn’t modify .htaccess.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Wild card redirects?’ is closed to new replies.