External links and php

Soldato
Joined
7 Jan 2007
Posts
10,607
Location
Sussex, UK
I have some external links on my wordpress site that are very long and filled with a lot of symbols. I have noticed on some sites that people seem to have "buried/hidden" these long external urls and simply have links like this:

/externallink1.php


I'm not sure what this technique is called but it would be very handy for me. Can anyone shed any light?
 
Isn't it called "using an anchor tag"? :p

Code:
<a href="http://www.host.com/stupidlylonglinkwithalotofsymbols.php?asdasdjaniuwnonqokwmelqmwe123123123123iudhfgpu9p82u349hu123n">notalonglink.php</a>
 
I think what the OP is after is redirection - you'd put something like this in your externallink1.php:
PHP:
header('Location: http://someothersite.com/with/a/ridiculously/long/path/to/the/page.html');
There's plenty of examples in the PHP documentation for the header function.
 
Back
Top Bottom