w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Redirect root and root only BUT not root with extra parameters /?param=foo

You can add one more condition to make sure this redirect works only when query string is not present:

RewriteEngine on
RewriteCond %{HTTP_HOST} mydomain.com [NC]
RewriteCond %{QUERY_STRING} ^$
Rewriterule ^/?$ http://shop.mydomain.com/ [L,R=301]




© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.