A Triumph Over Adversity: The WordPress IONOS Hosting User’s Guide to Redirecting .aspx Files
Redirecting a URL should be straightforward, correct? That’s what we thought, too. However, as we discovered, redirecting a specific .aspx path to an external URL in a WordPress site hosted on IONOS proved to be more of a trial by fire than anticipated. This article describes the frustrating—but ultimately successful—journey of making the redirect work. The Goal We wanted a basic redirect: https://example.com/stub/example.aspx to send visitors to: https://www.foobar.com/stub/example.aspx That’s it. A one-line change, right? Well… no. Attempt 1: The Obvious .htaccess Redirect We started with the simplest approach: Redirect 301 /stub/example.aspx https://www.foobar.com/stub/example.aspx Placed neatly above the WordPress block in .htaccess. Result: Didn’t work. The browser tried to download the .aspx file instead. Attempt 2: mod_rewrite to the Rescue We escalated to Apache’s rewrite rules: RewriteEngi...