Orginally Posted at tutorialzine
Last active
November 26, 2015 15:54
-
-
Save Shaz3e/82bc445330f7d7a2c7b5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RewriteEngine On | |
RewriteCond $1 !^(index\.php) | |
RewriteRule ^(.*)$ index.php?l=$1 [L] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$links = parse_ini_file('links.ini'); | |
if(isset($_GET['l']) && array_key_exists($_GET['l'], $links)){ | |
header('Location: ' . $links[$_GET['l']]); | |
}else{ | |
header('HTTP/1.0 404 Not Found'); | |
echo 'Unknown link.'; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
google = https://www.google.com/ | |
fb = https://www.facebook.com/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment