Welcome! Log In Create A New Profile

Advanced

Remove Query String on Root

Posted by developr 
Remove Query String on Root
July 25, 2012 12:48PM
Dear User,

today I had looked for a couple of hours for a solution.

RewriteCond %{QUERY_STRING} ^query=(.*)$
RewriteRule ^$ http://www.domain.com/? [L,R=301]

I tested some code but it doesn't work :-(.

try#1
if($arg_query !~ "") { rewrite ^ /? last; }

try#2
if($query_string ~ ".*query=.*") { rewrite ^/? last; }

Help... please, Help.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 102
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready