Answer the question
In order to leave comments, you need to log in
How to encrypt url before go.php?
Made a go.php page to redirect external links. I would like to know how they do url encryption before go? You need to hide your domain so that the external link looks like:
<a href="/go?xxxxxxxx"> И <img src="/kartinka/vesna.png">
$links = parse_ini_file('links.ini');
if(isset($_GET['go']) && array_key_exists($_GET['go'], $links)){
header('Location: ' . $links[$_GET['go']]);
exit;
}
else{
header('HTTP/1.0 404 Not Found');
echo 'Unknown link.';
}
RewriteEngine On
RewriteCond $1 !^(index\.php)
RewriteRule ^(.*)$ index.php?go=$1 [L]
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question