Skip to content

Instantly share code, notes, and snippets.

@crzapata
Created August 18, 2012 21:49
Show Gist options
  • Save crzapata/3390080 to your computer and use it in GitHub Desktop.
Save crzapata/3390080 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!';
});
@jrguitarflash
Copy link

thanks you I use that code

@changemachine
Copy link

Thank you! That is very helpful!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment