I am using wordpress for my website.in root directory
to remove query string from wesites url
I am using this code
RewriteCond %{QUERY_STRING} .
RewriteRule ^$ /? [R=301,L]
RewriteCond %{THE_REQUEST} ?
RewriteCond %{QUERY_STRING} .+
RewriteRule .? %{REQUEST_URI}? [R=301,L]
RewriteCond %{THE_REQUEST} ^(GET|HEAD|POST) /[^ ?]*?($| )
RewriteRule ^(.*)$ /$1? [L,R=301]
but now problem is that
wp-login.php?action=lostpassword
wp-login.php?action=register
this urls also redirecting to parent url
I tried excude wp-login.php file from this rule but didn work.
How to solve this issue?
Add the following rule above your existing rules :
This tells the engine to pass /wp-login.php without rewriting.