Skip to content

Instantly share code, notes, and snippets.

@happygrizzly
Forked from crzapata/MAMP Silex htaccess
Created February 3, 2016 13:56
Show Gist options
  • Save happygrizzly/2525e4668fd985c5589e to your computer and use it in GitHub Desktop.
Save happygrizzly/2525e4668fd985c5589e to your computer and use it in GitHub Desktop.
htaccess definition for silex when using MAMP
<IfModule mod_rewrite.c>
RewriteEngine on
#uncomment next line if silex app root is in a mamp subdirectory
#RewriteBase /your_mamp_htdocs_silex_app_root
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ web/index.php [L]
</IfModule>
define your silex routes as follows:
$app->get('/your_mamp_htdocs_silex_app_root/', function() {
return 'Hello World!';
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment