htaccess Cheatsheet

By Dave

Need help with htacces? Check out this cheatsheet.

Redirect Visitors to New Page/Directory

Redirect oldpage.html http://www.domainname.com/newpage.html
Redirect /olddir http://www.domainname.com/newdir/

Block Hot Linking/Bandwidth hogging

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?mydomain.com/.*$ [NC]
RewriteRule \.(gif|jpg)$ – [F]

Have something to tell us about this article?
Let us know

or Comment Below

Gaming Trailers

More Like This
Dead by Daylight | Deck The Trials Collection Trailer
Latest Trailers
House Flipper | Official Gameplay Trailer

Got a tip?

Let us know