WordPress.org

Support

Support » Plugins and Hacks » External querystring manipulation

External querystring manipulation

  • 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

  • The topic ‘External querystring manipulation’ is closed to new replies.
Skip to toolbar