Help with .htaccess replace subdomain with domain

I tried but I never did get it to work

I have my website hosted at lovebug.epizy.com and a parked domain lovebug.ml

I would like to change any url that contains lovebug.epizy.com to lovebug.ml

I just want to replace that part but keep anything after the same so if someone visits say lovebug.epizy.com/project-files/ it will be changed to lovebug.ml/project-files/

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

thanks

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

thanks

I found a solution

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

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