Skip to content

Instantly share code, notes, and snippets.

@manishk3008
Last active January 3, 2016 17:29
Show Gist options
  • Save manishk3008/8496327 to your computer and use it in GitHub Desktop.
Save manishk3008/8496327 to your computer and use it in GitHub Desktop.
.htaccess file for routing
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule . /index.php [L]
<?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