hello, i am trying to make short url or even pretty URLs inside my wordpress. suppose, i have a the_content filter that finds all external links inside post content, it needs to return short or pretty urls relative to my site URL.
external url:
stackoverflow.com/questions/ask
pretty url:
myblog.com/xyxd
making url is not a big deal! but I don't understand how can I then redirects visitors to original external site when he/she is visiting this pretty url?
suppose, one clicks or or enter:
myblog.com/xyxd
now, I need to redirect him (301/302) to:
stackoverflow.com/questions/ask
how can I do handle this (and also without conflicting with wordpress's native post/page urls).
any help?
thanks in advance even if you read this problem :).
Note: I had to remove http:// from all links as stackoverflow is not allowing me to put more than one link!