Last active
January 3, 2016 17:29
-
-
Save manishk3008/8496327 to your computer and use it in GitHub Desktop.
.htaccess file for routing
This file contains 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 | |
RewriteRule . /index.php [L] |
This file contains 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 | |
require_once __DIR__ . '/../vendor/autoload.php'; | |
$klein = new Klein\Klein(); | |
$klein->respond('GET', '/hello-world', function () { | |
return 'Hello World!'; | |
}); | |
$klein->respond('GET','/',function(){ | |
return "Hello"; | |
}); | |
$klein->respond(function () { | |
return 'All the things'; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment