danke Sven ;-)
Created
August 17, 2012 08:45
-
-
Save rschumm/3377094 to your computer and use it in GitHub Desktop.
Mini Layout Engine für Joopi
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 %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteRule ^(.*)$ index.php?site=$1 |
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
<html> | |
<head> | |
</head> | |
<body> | |
<h1>Welcome Rémy</h1> | |
<div> | |
<?php | |
if(isset($_GET['site'])) { | |
$site = $_GET['site']; | |
$illegal = array("\\", "/", "."); | |
$site = str_replace($illegal, "", $site); | |
if(!file_exists('sites/' . $site . '.php')) { | |
$site = '404'; | |
} | |
} else { | |
$site = 'home'; | |
} | |
include 'sites/' . $site . '.php' | |
?> | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment