简体   繁体   中英

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

在此处输入图片说明

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

是的,您应该做的是将真实链接保留在href属性中(这样,“复制链接位置”就可以使用),并在链接的click事件上使用一些Javascript将这个真实URL替换为您的重定向URL。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM