Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author alpipego

    (@alpipego)

    Hi @saimmughal,

    Thank you for using our plugin. I’m not sure what patterns these URLs follow. In case they are always your domain name followed by a single letter fragment, this would be the correct regex: [a-z]/ Like this:

    If this is not the correct RegEx—or you need it to be more specific—please let me know.

    Best regards,
    Alex

    Thread Starter saimmughal

    (@saimmughal)

    Thank you so much for writing the detailed instructions on this!

    Yes, It’s mostly starting with a single letter then “/” as I shared in the example above.

    https://example.com/c/random-page
    https://example.com/n/random-page
    https://example.com/t/random-page

    I also noticed some of these spam pages are making irrelevant 301 redirects like:

    https://example.com/t/random-page
    it will be redirected to some live post on my website which starts with /t
    https://example.com/the-live-page-on-website
    Is it safe to run the Regex?rule that you mentioned above seeing this criterion?

    These are the pages that I want gone:

    You can see there are some links with /account.php?randomtext

    Can I use 410 magic for them too? I will setup the rule on the website after your response!

    Thanks once again!

    Saim

    • This reply was modified 1 year ago by saimmughal.
    • This reply was modified 1 year ago by saimmughal.
    • This reply was modified 1 year ago by saimmughal.
    • This reply was modified 1 year ago by saimmughal.
    Thread Starter saimmughal

    (@saimmughal)

    Just an update I tried the [a-z]/ rule but it made all the post status 401 GONE due to irrelevant 301 redirects?as I mentioned above.

    Plugin Author alpipego

    (@alpipego)

    Hi @saimmughal,
    The redirects are most likely made by WordPress core through the redirect_canonical function. While this can theoretically be prevented through a filter by the same name, it’s most likely not something you want to do. If you have a list with URLs, you can share them with me via email [email protected] and I can check if I can detect a pattern.

    Just an update I tried the [a-z]/ rule but it made all the post status 401 GONE due to irrelevant 301 redirects as I mentioned above.

    This doesn’t make sense because either it’s a redirect or the URL resolves to something useful, but then our plugin shouldn’t intervene.

    You can see there are some links with /account.php?randomtext

    Can I use 410 magic for them too? I will setup the rule on the website after your response!

    Unfortunately, no. A request like this never hits the WordPress’ templating system, and therefore we won’t do anything with it.

    If you only have those 6 URLs, it might be easier to add them individually instead of using a RegEx.

    Please let me know if this helps.

    Kind regards,
    Alex

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Need help how to Regex url like /c/…’ is closed to new replies.