To use a file extension of any kind that is not HTML you will have to add an output format. Look at the following docs and come back here if that does not help you:
Initially I received a “400 Bad Request” error, and the %25 in the browser’s address bar was rewritten to %. Then I pasted the URL in to the address bar again and it started working. So my theory is that the built-in web server is behaves inconsistently with URLs like this.
To prove my theory, I published my test pages to an Apache site, and hit the page from both Chrome and Firefox. I was redirected without error on both.