Redirect htaccess
I need to help with redirect my page.
For example I have websites https://example.com. I need to move content from https://example.com to https://example.com/blog. That is not problem and I do that with a change home_page URL. That work pretty well. But Now I need to add redirect from old https://example.com to https://xmpl.com. I want to do with .htaccess but that does not work. Can you help me guys?
Here are some of my attempts of this but both does not work.
RewriteEngine On
RewriteRule https://example.com/ https://xmpl.com/ [L,R=302]
or
RewriteEngine On
Redirect 302 https://example.com/ https://xmpl.com/
Thank you for your help and time guys.
EDIT: That does not work means that this rule does nothning.
Example:
I have site https:// example.com and i changed homepage url to https:// example.com/blog and in .HTACCESS I added the rule. Result of this is that when I go on https://example.com I get https:// example.com/blog instead of new domain https:// xmpl.com