WWW to Naked Domain with Redirect Rules, preserving Path

Hey all, here's a kind of dumb one, but I'm looking for help with Redirect Rules (single rule).

The structure I'm looking for is, when incoming requests match:
URI Full starts with https://www.domain.com
or
URI Full starts with http://www.domain.com

Then URL redirect to
(effectively) https://domain.com/$path

I tried static with Preserve Query String, but it doesn't look like that's path aware, just query aware.

I think I need a dynamic expression, but I can't find any documentation for that use case and I searched a few pages of discord and same.

The page rule I'm trying to replace was redirect from www.domain.com/* to http://domain.com/$1

Thoughts on the expression I should use?

Thanks!
Finding the perfect website domain is as easy as 1-2-3. Buy a domain name, build and host a website, and enjoy our professional online marketing tools.
Finding the perfect website domain is as easy as 1-2-3. Buy a domain name, build and host a website, and enjoy our professional online marketing tools.
Was this page helpful?