How to get correct block details url with block height on blockchain.info I need to generate urls to block details page of blockchain.info when I have block height as input but cant find the relationship between block height and the number they are using in the url. 

Eg: For block 273294 the url is https://blockchain.info/block-index/335666 which contains the number 335666 instead of 273294. So how to convert 273294 to 335666.

Any help in conversion is appreciated.
Regards
It seems to me that Blockchain.info just increments the id of blocks whenever it sees a new one. If that is the case, the id of a block on Blockchain.info would just be an arbitrary number and the only relation that it has to the block height would be id ≥ height.

This is so, because it is possible that more than one successor to a block is found at roughly the same time. If that happens all successors (usually not more than two) will have the same block height, and are competitors to build the chain with the most accumulated work, "the longest" or main chain. This conflict will be resolved, when one chain gains another successor, pulling ahead of its competitors.
However, Blockchain.info will still store the detached blocks, allowing the id to grow quicker than the block height.

Apparently, Blockchain.info gives an overview of blocks at the same height under the URL https://blockchain.info/block-height/&lt;height&gt;. There it lists the hash of the main chain block, which you could use to lookup the id.