Forums

The ?author= link--can it be disabled? (3 posts)

  1. allyngibson
    Member
    Posted 2 years ago #

    The ?author= link.

    Is there any way to turn this off? A look at my server logs has shown that /?author=1 is being hit many times a day, usually by the Googlebots but also by really strange search phrases. A link to /?author=1 would then pull up and display eleven-hundred posts.

    Obviously, this is not ideal. Not for my server. Not for the person who hits their five words but in five different posts spread out over six years.

    So can it be disabled? The ?author= functionality?

  2. Otto42
    Moderator
    Posted 2 years ago #

    Not directly, however you can redirect those people to your normal site, if you like:

    RewriteCond %{THE_REQUEST} \?(author=.*)?\ HTTP [NC]
    RewriteRule .? http://example.com%{REQUEST_URI}? [R=301,L]

    Replace example.com with your site, obviously. And then stick this in the top of your .htaccess file. Anybody going to an author=whatever page will just get redirected back to your main page.

    However, it should not pull up all 1100 posts of yours. It should be limited to however many posts you normally show on the main page, like all other pages. Unless you have some strange code in your theme's author.php or something.

  3. allyngibson
    Member
    Posted 2 years ago #

    However, it should not pull up all 1100 posts of yours. It should be limited to however many posts you normally show on the main page, like all other pages.

    Otto42, that helped me out tremendously. I took a look at the Tarski loop, and I saw there was an option for pagination. I didn't have that set, so anything--category, tag, you name it--was loading everything.

    Now it's good. :)

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags