[英]how to change in below url redirect script
I have a url redirect script that works very well, but i want some change in it. 我有一个很好的url重定向脚本,但我想对其进行一些更改。
when i redirect outgoing link then at the end of redirected url i got something like ' #lcinside ' 当我重定向传出链接时,在重定向的URL末尾,我得到类似“ #lcinside ”的信息
example 例
http://dl.dropbox.com/u/36139836/unknown.html?urlc=http://imgur.com/
goes to 去
http://imgur.com/#lcinside
but i want to put #lcinside
before url start. 但我想在网址开始前加入
#lcinside
。
example 例
#lcinsidehttp://imgur.com
i want to put adf url redirect link instead of #lcinside
. 我想放置adf网址重定向链接,而不是
#lcinside
。
how can i put #lcinside
before url . 我如何将
#lcinside
放在#lcinside
之前。
below is script. 下面是脚本。
please help me. 请帮我。
<script>
function gup(sName)
{
sName = sName.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
var sRegEx = "[\\?&]" + sName + "=([^&#]*)";
var regEx = new RegExp(sRegEx);
var aResult = regEx.exec(window.location.href);
if(aResult == null)
{
return "";
}
else
{
return aResult[1];
}
}
if(gup("urlc") != "")
{
window.location = gup("urlc").replace("lcamp", "&") + "#lcinside";
}
</script>
如果您只是尝试清理引荐来源网址,则可能应该使用元刷新
<meta http-equiv="refresh" content="1;url=http://imgur.com/#lcinside">
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.