This question is related to the question How to avoid the "http:" part in hyperref's \url? and the solutions https://tex.stackexchange.com/a/139934/39306 and https://tex.stackexchange.com/a/139925/39306.
I would like to re-define \url in such a way that the following produce the same result.
\url{ipython.org}
or
\url{http://ipython.org}
(Using \rurl{http://ipython.org} given in the solution above seems to not work, in fact after compiling by pdflatex, clicking on http://ipython.org on pdf file, leads to the nonexistent page http://www.http.com//ipython.org) see the example below based on the solution https://tex.stackexchange.com/a/139934/39306:
\documentclass{article}
\usepackage{hyperref}
\newcommand\rurl[1]{%
\href{http://#1}{\nolinkurl{#1}}%
}
\begin{document}
\rurl{ipython.org}\\
\rurl{http://ipython.org}
\end{document}
\shorturland\rurlcommands in those answers are just for the case without http, leaving\urlfor the full form. That is probably the most robust/flexible solution why do you need the same command? (it is hard to detect a local link as different from a URL with omitted http if you want to use teh same command) – David Carlisle Dec 09 '14 at 12:19