Help with .htaccess replace subdomain with domain

I tried but I never did get it to work

I have my website hosted at and a parked domain

I would like to change any url that contains to

I just want to replace that part but keep anything after the same so if someone visits say it will be changed to

if I could find documentation for rewrite rules that actually explained something then I could do it myself


I take that back, I found this Apache mod_rewrite Introduction - Apache HTTP Server Version 2.4 and it just blew my brains out. I cant understand it :cry:

just add it as an alias

could you supply the code, thanks

I really want to redirect them to the new domain name but keep any of the old links intact in the url


I found a solution

RewriteEngine On
RewriteCond %{HTTP_HOST} !^lovebug\.ml$
RewriteRule (.*)$1 [L,R=301]
1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.