I am not sure if this is an issue with how web sites are configured, or the hyperref pacakge. The following two links are correct (which you can verify by copying the first paramater to \href{}{} and pasting in a browser.
\href{https://en.wikipedia.org/wiki/Global_warming#Regional_trends}{Climate Change: Regional Trends}
\href{http://www.imperial.ac.uk/a-z-research/#group-M}{A-Z Research: Group M}
However, clicking on the pdf file for the second link does not work. It seems as if the offending link that is attempted to be opened is
http://www.imperial.ac.uk/a-z-research/%23group-M
where the # has been replaced with a %23. However, the Wikipedia link seems to be displayed with the # in the URL.
So, is there anything I can do when generating the PDF to get both of these links to correctly work. Preferrably I can do this without having to manually click on the link and determine if tweaking is required.
Code:
\documentclass{article}
\usepackage{hyperref}
\begin{document}
\href{https://en.wikipedia.org/wiki/Global_warming#Regional_trends}{Climate Change: Regional Trends}
\href{http://www.imperial.ac.uk/a-z-research/#group-M}{A-Z Research: Group M}
\end{document}
pfdlatex. Are you sure that clicking on the second link takes you to the same page as cutting and pasting the URL? The 404 error page has the similar formatting to the actual page, but different content. – Peter Grill Jan 29 '20 at 19:51#in URLs. So this might be viewer dependant. Which PDF reader do you use? – Marcel Krüger Jan 29 '20 at 19:51