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: 142
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready