I have a problem with my htaccess file in wordpress. I want to redirect users who come to /wp-login.php?action=register to another registration form with role parameter. Like this /wp-login.php?action=register&role=patient. So i wanna hide first url from users. I wrote this line in my htaccess.
RewriteRule ^wp-login.php?action=register$ /wp-login.php?action=register&role=patient [NC,L]
It’s located here in my file:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^wp-login.php?action=register$ /wp-login.php?action=register&role=patient [NC,L]
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
And i have no effect with that. What am i doing wrong here?
You have to match for the query string in a
RewriteCond:Edit: corrected my answer