How to Disable Hotlinking of the Images Using .htaccess file?

Hotlinking ProtectionThe people who don’t know, a Hot-linking is when some other website uses images hosted on your site or blog. For example: a.com is your site and has some pretty nice images, then b.com decides that instead of hosting those images on their server, they can just link from their pages to the images hosted on your site a.com.

Hot-linking usually is bandwidth and of course content stealing. The b.com site will not pay for the traffic used as the image is being loaded from site a.com.

So it is a good practice to prevent images hot-linking:

You can prevent the hot-linking of your images by creating a simple code in the .htaccess file:

RewriteEngine on

RewriteCond %{HTTP_REFERER} !^$

RewriteCond %{HTTP_REFERER} !^http://(www.)?example.com/.*$ [NC]

RewriteRule \.(gif|jpe?g|png)$ – [F]

The above code will result in a broken image to be displayed when it is hot-linked.

The example above works for .GIF, .JPG and .PNG files, but you can add any file extension.

If you place the .htaccess file in the main folder of your site it will disable hot linking for all your site.

To block other type of files, just add their extension to the list above. For example to block movie files:

RewriteRule \.(mov|avi|wmv|mpe?g)$ – [F]

The Hot-Linking Protection is based on an Apache module called ModRewrite. So your web host should support it in order for you to be able to use these on your site.

GD Star Rating
loading...

Posted under Webhosting

How to Move Your Blog from Blogspot to Your Own Hosting?

Blogger and WordPressMoving your Blogspot blog to your own hosting is undeniably a clever decision of time, but before that you might be looking for the right Web Hosting Plans that will fulfill your current and future needs. If you are seeking for an option that can let you bring all your Blogspot entries, comments and of course your blog traffic to your own hosted blog then, WordPress is the right choice for you.

WordPress as it’s the most famous blogging software on Paid hosting. Well, here’s the step by step guideline for moving your Blogspot blog to your own hosting using WordPress. There may be two situations for this:

  1. You’ve yourblog.blogspot.com
  2. You’ve yourblog.com hosted by WordPress

In first situation you’ll be moving like:

  • Prepare for the migration by uploading few .php and .html test pages
  • Install WordPress on your server
  • Go to WordPress Dashboard > Manage > Posts, and delete “Hello World”
  • Now go to Manage > Import > Select Blogger and follow the instructions. All your entries and comments are there now.

Now go to your Blogspot blog and download all images, and upload them on your own server and enter them in the posts manually. (This is a hectic job, but you’ll have to do it.)

In second situation, you’ll have to:

  • First get back to yourblog.blogspot.com from your Blogspot account. For this go to Setting > Publishing > Switch to Blogspot.
  • Now change the name servers of your domain from your domain panel. You’ll have to give new name servers, i.e. as prescribed by the new hosting company.
  • And now follow all the steps as described in case 1.

Your Blogspot blog is now completely moved and set on your own hosting. Experience the new interface and better customization.

GD Star Rating
loading...

Posted under Blogging