Skip to content

Instantly share code, notes, and snippets.

@ganoro
Created December 6, 2011 19:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ganoro/1439559 to your computer and use it in GitHub Desktop.
Save ganoro/1439559 to your computer and use it in GitHub Desktop.
Post stage script
<?
// get application location
$appLocation = getenv('ZS_APPLICATION_BASE_DIR');
// modify htaccess
$htaccess_file = $appLocation . '/web/.htaccess';
$explode = explode ( '/', $appLocation );
$appname = $explode [sizeof ( $explode ) - 2];
$content = file_get_contents ( $htaccess_file );
$content = str_replace ( '<application-name>', $appname, $content );
file_put_contents ( $htaccess_file, $content );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment