I use bit.ly to shorten my urls.
My problem – paramters are not passed.
Let me explain I use http://bit.ly/MYiPhoneApps which redirects (let’s say) to http://iphone.pp-p.net/default.aspx
Now when I try http://bit.ly/MYiPhoneApps?param=xx this param is not added to the resulting url.
I know I could create an extra “short url” including a paramter – so http://bit.ly/WithParam would result in http://www.mysite.com/somepath/apage.aspx?Par1=yy and so forth.
But what I want is to have a short URL directing to a page – and then I want to add a parameter to this shortened url – which shoul (of course) land at my page.
Is this a shortcome of bit.ly (and others are maybe able to do it) – or does “parameter forwarding” not work with 301 redirections?
Manfred
There’s no technical reason why it couldn’t be done. The service would simply have to look at what parameters it is being sent, and then rewrite the target URL accordingly.
The problem is that it’s not necessarily well defined how to do that.
Suppose you have the url
http://example.com/default.aspx?foo=bar, and it has the short urlhttp://foo.com/ABCD. What should happen if you try to accesshttp://foo.com/ABCD?foo=baz? Should it replace the value, so you getfoo=baz? Should it append it to makefoo=bar&foo=baz? If we include both, which order should they be in?The system cannot know which parameters are safe to override and which are not, because sometimes, you DO want both of them in the URL, and it may matter what order things are added in.
You could argue “Well, just don’t allow this for URLs where parameters are already present”, but there’s also the issue that it’s going to complicate the process a lot more. Without this, you just lookup a key in a database and send a redirect header. Now, you need to also analyze the URL to check for parameters, and append part of the URL you were called by. That requires more system resources per redirect, which may become a big problem if your service is used very frequently – you’ll need more server power to handle the same amount of redirects. I don’t think that tradeoff is considered to be “worth it”.