We have redesigned our site and have switched from asp.net (umbraco) to Drupal. To complicate matters, we've changed the domain name.
The old domain name has a 301 redirect to the new domain name.
All of the old URLs have .aspx file extensions.
The new URLs all match, but without the file extensions, and using the new domain name.
example:
olddomain.com/file-name.aspx
newdomain.com/file-name
I'm not having success with the common rewrite rules for removing file extensions. I think it's because things are complicated due to the domain redirect.
When I enter an old URL with the .aspx file extension, the redirect adds the entire local path to the URL instead of starting at the web root.
Here is the rule I'm using:
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.aspx -f
RewriteRule ^(.*)$ $1.aspx
How can I edit this to achieve the results I'm looking for?
Thanks!