Is there such a thing?
A way it might be used:
Many locations have forms that post to http://www.example.com/wally/app/receiver.aspx
Managements decides they want a cleaner URL and there is no reason to pretend you are using aspx (you didn’t really think I was using aspx for that did you?)
They say it should be http://example.com/receiver
Easy enough! Just put a 301 redirect. No need to update all those forms that exist all over..,, but wait.. You can’t do that for POST.
Perhaps you can receive and handle the request and then re-write the URL without causing a subsequent request? Perhaps this will not strip the www (cross domain), but can it shorten the pathname like that without a separate request?
Even in GET requests, this would indeed be a performance boost if one could re-write the URL and send the response body at the same. Can this be done?
You cannot send content to user and do 301/302 etc redirect at the same time — browser interprets the HTTP Response code and acts accordingly to the code received. If 301/302 — it will do redirect, if 200 — will display it to the customer.
Yes — it’s called rewrite (internal redirect). For example — customer requests
http://example.com/receiver. You rewrite URL to point to/wally/app/receiver.aspx(e.g.RewriteRule ^receiver$ /wally/app/receiver.aspx [L]— that’s if you have an Apache, which you most likely not (consideringreceiver.aspx)). This will do internal redirect when URL remains unchanged in browser address bar (works fine with POST and GET methods).