I need someone to help me with a htaccess file to redirect my urls.
https://www.example.com/?a=support to https://www.example.com/support
https://www.example.com/?a=register to https://www.example.com/register
https://www.example.com/?a=login to https://www.example.com/login
https://www.example.com/?a=contact to https://www.example.com/contact
How to do this.
Create a file named ".htaccess" in yours website root (https://www.example.com). In that file, put (or append) the following code:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ ?a=$1 [QSA,L]
</IfModule>
You must capture the path and append it as a query string
RewriteCond %{QUERY_STRING} !^a=
RewriteRule ^.*$ /?a=$0 [L]