'Use .htaccess to redirect to a mailto link

I would like to redirect mailto links at the end of URLs to just the mailto link. This is to get around a restriction in a program that only allows http/https links.

For example, https://example.com/mailto:[email protected] should redirect to just mailto:[email protected]



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source