I would like to write a macro similar to the \href command from the hyperref package, but which takes a single argument. The URL is generated by making the argument lowercase.
Here is a minimal example:
\documentclass{article}
\usepackage{hyperref}
\newcommand\mylink[1]{\href{www.\lowercase{#1}.com}{#1}}
\begin{document}
\mylink{MyURL}
\end{document}
However, the \lowercase command is not expanded, and the link points to www.\lowercase{MyURL}.com. Is there a way to solve this problem?