
Share Code chuyển hướng link redirect 301 thay thế .htaccess cho xtgem
17.07.2014/10:37
Demo:
http://iuvn.wap.sh
dán code này vào _header hoặc trong thẻ
<head><?php
<!--parser:xtscript-->
assign $re=<xt:url type="domain">
var $tm=<xt:url type="path">
var $sp=sieupham.net
var $iuvn=iuvn.wap.sh
assign $1={{<script>
var link='<xt:url>';
if
(location.hostname=='$iuvn')
{
window.location=link.replace('$iuvn','$sp');
};</script>}}
assign $2={{<xt:include file="/$tm" />}}
if $re=$iuvn
print $1
else
print $2
endif
<!--/parser:xtscript-->
?>
Nguồn: viethoaf1 - sieupham.net