<?php | |
date_default_timezone_set('America/Sao_Paulo'); | |
class Deploy { | |
public $post_deploy; | |
private $_log = 'var/log/deployments.log'; | |
private $_date_format = 'Y-m-d H:i:sP'; | |
private $_branch = 'develop'; |
A collection of useful .htaccess snippets, all in one place.
Disclaimer: While dropping the snippet into an .htaccess
file is most of the time sufficient, there are cases when certain modifications might be required. Use at your own risk.
IMPORTANT: Apache 2.4 introduces a few breaking changes, most notably in access control configuration. For more information, check the upgrading document as well as this issue.
What we are doing here is mostly collecting useful snippets from all over the interwebs (for example, a good chunk is from Apache Server Configs) into one place. While we've been trying to credit where due, things might be missing. If you believe anything here is your work and credits should be given, let us know, or just send a PR.
#################################################################### | |
################## Creare's Magento .htaccess File ################# | |
#################################################################### | |
##### Block unwanted Bots that clog the server ##### | |
RewriteCond %{HTTP_USER_AGENT} MJ12bot | |
RewriteRule .* - [F] | |
RewriteCond %{HTTP_USER_AGENT} 80legs [NC] | |
RewriteRule ^ - [F] |
######################################################################################## | |
##################### Creare's robots.txt file for Magento websites #################### | |
######################################################################################## | |
User-agent: * | |
Allow: / | |
#Disallow: / | |
####################################### | |
############### SITEMAP ############### |
For Magento v1.5+ (need to test in older versions).
1 - Create an template file in page/html/footer/extras.phtml with this content:
<?php echo $this->getCssJsHtml() ?>
2 - Add this html node to your layout xml:
<reference name="before_body_end">
body,input,textarea,select,button{
text-rendering:optimizeLegibility;
-webkit-font-smoothing:antialiased;
-moz-osx-font-smoothing:grayscale;
-moz-font-feature-settings:"liga", "kern"
}
.no-fontsmoothing{
-webkit-font-smoothing: subpixel-antialiased;
-moz-osx-font-smoothing: auto;
}
Input HTML5 na Product View.
File
app/design/frontend/base/default/template/catalog/product/view/addtocart.phtml
Code
This gist assumes:
- you have a local git repo
- with an online remote repository (github / bitbucket etc)
- and a cloud server (Rackspace cloud / Amazon EC2 etc)
- your (PHP) scripts are served from /var/www/html/
- your webpages are executed by apache
- apache's home directory is /var/www/
Permissõa correta!
chown -R _www:_www * # Let apache be owner
# rwxr-xr-x
sudo find . -type d -exec chmod 755 {} \;
# rw-r--r--
sudo find . -type f -exec chmod 644 {} ;