background preloader

10 useful .htaccess snippets

10 useful .htaccess snippets
.htaccess, the file which control the Apache webserver, is very useful and allows you to do a lot of things. In this article, I have compiled 10 .htaccess snippets that any web developer should have in his toolbox. Before editing your .htaccess file, always make a backup so you can restore it if needed. Remove www in url For SEO reasons, you might always remove (or use) the www prefix in your urls. The following snippet will remove the www from your website url and redirect any url with the www to the non-www version. RewriteEngine On RewriteCond %{HTTP_HOST} ! Source: Prevent hotlinking Hotlinking is a bad practice that consist of using the images from another site on yours. Source: Redirect all WordPress feeds to feedburner Most bloggers are using Feedburner, a web service that lets you know how many people are reading your blog via feeds. <IfModule mod_alias.c> RedirectMatch 301 /feed/(atom|rdf|rss|rss2)/? Create custom error pages

Foundation Icons Fonts - ZURB Playground - ZURB.com settings heart star plus minus checkmark remove mail calendar page tools globe cloud error right-arrow left-arrow up-arrow down-arrow trash add-doc edit lock unlock refresh paper-clip video photo graph idea mic cart address-book compass flag location clock folder inbox website smiley search phone General Enclosed Set Social Set thumb-up thumb-down facebook twitter pinterest github path linkedin dribbble stumble-upon behance reddit google-plus youtube vimeo clickr slideshare picassa skype instagram foursquare delicious chat torso tumblr video-chat digg wordpress Accessibility Set wheelchair speaker fontsize eject view-mode eyeball asl person question adult child glasses cc blind braille iphone-home w3c css key hearing-impaired male female network guidedog universal-access elevator How These Were Built Here at ZURB, we’re always trying to think of new ways to innovate on our processes and methods. How to Use Them We've made it super easy for you to get going with these icons! Merge in the Styles

Getting Need reasons to love Bootstrap? Look no further. By nerds, for nerds. Built at Twitter by @mdo and @fat, Bootstrap utilizes LESS CSS, is compiled via Node, and is managed through GitHub to help nerds do awesome stuff on the web. Made for everyone. Bootstrap was made to not only look and behave great in the latest desktop browsers (as well as IE7!)

Related: