: HTACCESS change subdomain, add a custom file extension and url parameters I'm trying to redirect this url: www.example.com/path/index.php?user=username&option=optname to username.example.com/path/optname.html
I'm trying to redirect this url:
example.com/path/index.php?user=username&option=optname
to
username.example.com/path/optname.html
I tried several ways but I'm getting errors. How to do that?
More posts by @Si4351233
1 Comments
Sorted by latest first Latest Oldest Best
Here's the sample rewrite commands you should be looking for:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^example.com [NC,OR]
RewriteCond %{HTTP_HOST} ^www.example.com [NC]
RewriteRule ^(.*)$ example.net/ [L,R=301,NC]
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.