Disallow hotlinking while allowing requests from robots.txt and favicons
We all hate Leechers. Here’s how to stop them in their tracks from stealing your images and your bandwidth!
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{REQUEST_URI} !(^/robots\.txt|\.ico)$
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?example.com(/)?.*$ [NC]
RewriteRule .*\.(gif|jpg|jpeg|bmp|pdf)$ [F,L]
How to create a sandbox PayPal Payflow account

I’ve been working with PayPal PayFlow Pro a lot lately. But before I got the hang of it, I couldn’t figure out how to create a sandbox account for Payflow.
As it goes, it’s different than setting up a standard sandbox account. To set up a Payflow account for testing, you would walk through the sign up process as if you were signing up for a live Payflow account. Once you get to the section in the sign up process where it is asking for the billing information, just cancel out of the process. This creates a test account for you at this point, which you can access by signing into PayPal Manager with the login and password that you created. The partner will be PayPal.
Creating an .htaccess file on Windows
Everyone who has tried creating a .htaccess on windows knows that Windows Explorer does not accept the ‘.’ character as the first character of a file. For most of you this may be old stuff, but for the newbies, the quick way to create a file that starts with a ‘.’ is actually pretty simple.
Open notepad and save the document with file name .htaccess with the ‘save as type’ set to ‘All Files’; or save the document with file name as “.htaccess” including the quotes. Hope this helps someone!
htaccess – How to redirect all http (port 80) requests to https (port 443)
Sometimes you may need to redirect http requests on port 80 to (https) on port 443. This can easily be accomplished with .htaccess.
RewriteEngine on
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^/(.*) https://%{SERVER_NAME}/$1 [NC,R,L]
Magento – How to run a SQL query against the database
In order to run a SQL query against the Magento database, you first need a resource model then a database connection.
$db = Mage::getResourceSingleton('core/resource')->getConnection('core_write');
$result = $db->query('SELECT 'entity_id' FROM 'catalog_product_entity');
if(!$result) {
return FALSE;
}
$rows = $result->fetch(PDO::FETCH_ASSOC);
if(!$rows) {
return FALSE;
}
print_r($rows);
Magento – The best Magento Extensions
Here are some of the best Magento extensions that I’ve come across.
- Magento Live Chat
This free module will provide LiveChat support in Magento.
- Fontis WYSIWYG Editor
This extension gives you the option to enable a JavaScript WYSIWYG editor to specified admin pages. Currently available editors are: TinyMCE and FCKeditor.
- Lazzymonks Twitter
Displays Twitter updates in the menu and allows updates from within the admin panel.
- Events Calendar
With this extension, you can display an events calendar on your website. Events are stored in the database. You can also display the upcoming list of events quickly by calling a block in your template.
- Blog
Full featured blog extension for Magento.
- Raffle
This module gives you basic functionality to run your own raffles.
- Customer Groups Configurable Catalog
This extension enables you to hide categories and products from customers depending on the customer group.
- Exploded Menu
Replaces the standard single column drop down with a multi-column dropdown featuring 2nd and 3rd level menu items.
- Velite Magento Superstage
Functionality, intuitive interaction and product presentation with really high detailed images are the main features.
- Magento EasyLightbox
This small extension will help to install Lightbox widget. Installation and configuration will take approximately 5 minutes. No files are replaced and no codding experience needed to install!
- Magento Exploded Menu
Replaces the standard Magento menu with a multi-column drop down menu system.
Magento – Upgrade to the latest version using Magento Connect
Upgrading Magento to the latest version is a fairly simple task. Copy and Paste this key below VIA Magento Connect where it states “Paste extension key to install:”. This will upgrade Magento to the newest version.
magento-core/Mage_All_Latest
-
J. K. Rowling donates $15 million for MS clinic http://om.ly/tkkw
- Follow me
Last Tweet
-
Archives
Categories
My Favorites
- 37 Signals
- Andrew Warner
- Chris Coyier
- Chris Shiflett
- Collis Ta'eed
- Development Seed
- Drupal
- HubSpot
- James Padolsey
- Joel On Software
- John Resig
- jQuery
- Kevin Rose
- Life Hacker
- Magento
- Mashable
- Matt Cutts
- Matt Ryan
- MySQL
- NetTuts
- Noupe
- Photoshop Tutorials
- PHP
- Smashing Magazine
- Tech Crunch
- WoorkUp
- Wordpress
