Hi, if you dont know how to use mod rewrite, you need to search over and over again manuals.
Im confortable more in searching than investing my time, what about You?
So here is the command to redirect all subpages of a domain to one page
RewriteEngine On
RewriteCond %{REQUEST_URI} !=/index.php
RewriteRule .* /index.php
you can choose any other file instead of homepage (index.php)
Add these above 3 lines into your .htaccess file (yourdomain.tld/.htaccess)
---------------------------
If you need to redirect all subpages to another new domain while retaining subpage address, (htaccess old domain to new domain), You can use this command in your htaccess:
RedirectMatch 301 (.*) http://yournewdomain.com$1
Downside of above redirect: it will redirect yourOLDdomain.com/somesubpage to yourNEWdomain.com/somesubpage
---------------------------
If you need to redirect yourNEWdomain.com/somesubpage to yourNEWdomain.com do this htaccess command:
RedirectMatch 301 / http://yournewdomain.com