WordPress.org

Ready to get started?Download WordPress

Forums

External querystring manipulation (1 post)

  1. warmbeer
    Member
    Posted 7 years ago #

    While looking at my logfiles, i found out, that some guys tried to hijack my domain by adding some odd querystring behind my permalinks. for example

    http://wordpress.org/support/?adasd will show the same post than without the query ?adasd.

    I assume, that this are no attempts of capturing content from my blog :). One possible reson could be a social linking strategy aiming on multiple content on my site.

    The following piece of code before the regular header_template comes along with a very hot needle but provides a correct 404 Error.

    $TestMe = $_SERVER['REQUEST_URI'];
    if(strpos($TestMe, "?")){
    header("HTTP/1.0 404 Not Found");
    include(TEMPLATEPATH . '/404.php');
    exit();
    }

    Now urls of the stylesheets and grafics still can be treated the same way. Has anyone got an idea for a cute .htaccess solution?

    thnx

    greetings from bavaria

Topic Closed

This topic has been closed to new replies.

About this Topic