Skip to content

Instantly share code, notes, and snippets.

@awildeep
Created May 21, 2011 04:35
Show Gist options
  • Save awildeep/984253 to your computer and use it in GitHub Desktop.
Save awildeep/984253 to your computer and use it in GitHub Desktop.
Mounted application redirect test
<?php
require_once __DIR__.'/silex.phar';
$subApp = new Silex\Application();
// define your blog app
$subApp->get('/', function () use ($subApp) {
return $subApp->redirect('/redirect');
});
$subApp->get('/redirect', function () {
return 'I have been redirected';
});
$app = new Silex\Application();
$app->mount ('/test', $subApp);
$app->run();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment