I asked on stackoverflow, but I was marked as a duplicate question - despite the duplicate question having received no valid answers.
I would like my landing page to stay the same. So loading www . sample . com/ will not redirect anything. However, anything after that, such as www . sample . com/page-link/ will redirect to the new sitewww . newsite . com/page-link/.
I tried this
RedirectMatch 301 /(.*) http : //www . newsite . com/
But it redirects the homepage. Again, the homepage (root url) of www.sample.com should load as it normally does. But any query added in the form of
permalink-here/ should be redirected. Is this something that is simple to do?
So, for this to function I need the redirect to only be called if someone is added after the trailing slash.
Example:
www . sample . com/ - DO NOT REDIRECT
www . sample . com/permalink-here/ - REDIRECT