diff --git a/index.php b/index.php index 87c638d..abd1525 100644 --- a/index.php +++ b/index.php @@ -6,27 +6,30 @@ use Steampixel\Route; // Include router class include 'src/Steampixel/Route.php'; +// Define a global basepath +define('BASEPATH','/'); + function navi() { - echo << -
  • home
  • -
  • index.php
  • -
  • edit user 3
  • -
  • foo 5 bar
  • -
  • long route example
  • -
  • contact form
  • -
  • get+post example
  • -
  • test.html
  • -
  • PHP Info
  • -
  • aTrailingSlashDoesNotMatter
  • -
  • aTrailingSlashDoesNotMatter/
  • -
  • theCaseDoesNotMatter
  • -
  • thecasedoesnotmatter
  • -
  • 404 Test
  • -
  • 405 Test
  • +
  • home
  • +
  • index.php
  • +
  • edit user 3
  • +
  • foo 5 bar
  • +
  • long route example
  • +
  • contact form
  • +
  • get+post example
  • +
  • test.html
  • +
  • PHP Info
  • +
  • aTrailingSlashDoesNotMatter
  • +
  • aTrailingSlashDoesNotMatter/
  • +
  • theCaseDoesNotMatter
  • +
  • thecasedoesnotmatter
  • +
  • 404 Test
  • +
  • 405 Test
  • -EOD; + '; } // Add base route (startpage) @@ -149,7 +152,7 @@ Route::methodNotAllowed(function($path, $method) { // Run the Router with the given Basepath // If your script lives in the web root folder use a / or leave it empty -Route::run('/'); +Route::run(BASEPATH); // If your script lives in a subfolder you can use the following example // Do not forget to edit the basepath in .htaccess if you are on apache