Eka
Eka

Reputation: 15002

Efficent url redirection in php

I am using a url redirection technique similar to google

Example

if you type wikipedia in google you get a wikpedia page result but if you click the link it will first go to this kind of redirecting link

http://www.google.com/url?some_paramaeters_for_wikipedia_page_redirection

and then it will go to

http://www.wikipedia.org/

i have made similar algorithm in my website and its working properly;But as in google when you want to copy the link location

enter image description here

it doesnt copy the main web link

http://www.wikipedia.org/

Instead it copies

http://www.google.com/url?some_paramaeters_for_wikipedia_page_redirection

I want to know if it is possible for users to copy the orginal link instead of url redirecting link without changing redirecting method.

Thanks for your info

Upvotes: 0

Views: 117

Answers (1)

Damien
Damien

Reputation: 5882

Yes, what you should do is keep the real link in the href attribute (so the "Copy link location" works), and with a bit of Javascript, on the click event of your link, replace this real URL with your redirecting one's.

Upvotes: 1

Related Questions