Skip to content

Instantly share code, notes, and snippets.

View jonathonbyrdziak's full-sized avatar
🔥
Scaling Businesses with Marketing Technology

Jonathon Byrdziak jonathonbyrdziak

🔥
Scaling Businesses with Marketing Technology
View GitHub Profile
@jonathonbyrdziak
jonathonbyrdziak / .htaccess
Last active August 29, 2015 14:11
This is how you determine if mod_rewrite is enabled
#####################################
#
# Add this HTACCESS file to your Apache web server to determine if mod_rewrite is enabled
# provided by http://magentosupport.help
#
# once installed, visit yourdomain.com/testing_mod_rewrite.html
RewriteEngine On
Options +FollowSymLinks
RewriteRule ^testing_mod_rewrite\.html$ http://magentosupport.help/? [R=302,L]
@jonathonbyrdziak
jonathonbyrdziak / web.config
Created January 2, 2015 22:09
Magento web.config for Windows 2008 Server and IIS 7
<rewrite>
<rules>
<rule name="Imported Rule 1” stopProcessing="true">
<match url=".*" ignoreCase="false" />
<conditions>
<add input="{URL}" pattern="^/(media|skin|js)/" ignoreCase="false" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
</conditions>
<action type="Rewrite\" url="index.php" />
@jonathonbyrdziak
jonathonbyrdziak / Mysql.php
Created April 16, 2015 16:29
Enabling Mysql Debuggin in Magento
<?php
/**
* http://magentosupport.help/knowledgebase/enable-magento-debug-mode-and-the-magento-profiler/
*/
/**
* Write SQL debug data to file
*
@jonathonbyrdziak
jonathonbyrdziak / index.php
Last active August 29, 2015 14:19
Enable Magento Profiler
<?php
/**
* http://magentosupport.help/knowledgebase/enable-magento-debug-mode-and-the-magento-profiler/
*/
Varien_Profiler::enable();
Mage::setIsDeveloperMode(true);
@jonathonbyrdziak
jonathonbyrdziak / log.php
Created April 16, 2015 16:44
Magento Print Query Logs
<?php
/**
* http://magentosupport.help/knowledgebase/enable-magento-debug-mode-and-the-magento-profiler/
*/
echo $query->printLogQuery(true);
@jonathonbyrdziak
jonathonbyrdziak / index.php
Created April 17, 2015 16:46
Enable Magento maintenance mode and developer bypass
<?php
/**
* [solved] Enabling developer bypass IP check
* Learn HOW TO http://magentosupport.help/knowledgebase/solved-enable-magento-maintenance-mode-with-custom-503-page/
*
* Magento
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
@jonathonbyrdziak
jonathonbyrdziak / index.php
Created April 17, 2015 16:48
Enable Magento maintenance mode and developer bypass [code snippet]
<?php
/**
* [solved] Enabling developer bypass IP check
* Learn HOW TO http://magentosupport.help/knowledgebase/solved-enable-magento-maintenance-mode-with-custom-503-page/
*
* This code needs to be added just before the maintenance flag file checking in index.php or it will not work.
* @see the referenced url above for instructions.
*/
$ip = $_SERVER['REMOTE_ADDR'];
@jonathonbyrdziak
jonathonbyrdziak / 503.phtml
Last active August 29, 2015 14:19
simple landing page
<!DOCTYPE html>
<!--
SIMPLE LANDING PAGE
Created to replace the 503 maintenance notice
http://magentosupport.help/knowledgebase/solved-enable-magento-maintenance-mode-with-custom-503-page/
--->
<!DOCTYPE html>
<html lang="en"><head>
@jonathonbyrdziak
jonathonbyrdziak / page.phtml
Created April 17, 2015 17:50
Theming the magento error pages
<?php
/**
* SIMPLE LANDING PAGE
* Created to replace the 503 maintenance notice
* http://magentosupport.help/knowledgebase/solved-enable-magento-maintenance-mode-with-custom-503-page/
*/
require_once $contentTemplate;
?>
@jonathonbyrdziak
jonathonbyrdziak / Fulltext.php
Last active August 29, 2015 14:19
Enhancing Magento's Search operator AND OR
<?php
/**
* Enhancing Magento's Search operator AND OR
* @see tutorial http://magentosupport.help/knowledgebase/optimizing-the-magento-search-algorithm/
* @ver Magento v1.9.0.1
*
* Magento
*
* NOTICE OF LICENSE
*