Tag Archives: .htaccess

Password Protecting a Directory using .htaccess & .htpasswd

In this short and easy guide we will be explaining how to password protect your directories using a .htaccess and a .htpasswd file.

Tagged ,

Protecting WP-Admin with .htaccess

WordPress is as secure as your login to its admin interface (if you keep all plugins/themes and core engine to latest stable release). Since WordPress requires the admin login for management, it is available by default on public Internet for … Continue reading

Tagged ,

Setting a new document root with .htaccess

In today’s blog post we will cover setting a new document root with .htaccess. Let’s first go over why you’d want to set a new document root. This blog only applies to customers on our Linux hosting plans.

Tagged ,

Redirecting HTTP to HTTPS using .htaccess

In this blog post, we will cover how you can redirect visitors from the plain text HTTP version of your website over to the secure and encrypted HTTPS version using a .htaccess file. We will also cover some reasons as to … Continue reading

Tagged ,

Blocking referer link spam with .htaccess

Most people have some form of analytics linked to their domain so they can see where their visitors are coming from. Spammers have now taken to using referer links to try getting you to visit their website. The way this works is they would … Continue reading

Tagged ,

Using a .htaccess file to block IP addresses

.htaccess files are powerful configuration tool to be used within a Linux hosting enviroment. They can be used for all sorts of server side configurations, in this example we are going to show you how to use them to block … Continue reading

Tagged ,

Enabling Gzip with a .htaccess file

In this guide we are going to show you how to enable Gzip on our Linux hosting enviroment. Gzip is used for compressing text based files such as HTML, JavaScript and CSS and is used to decrease load times for … Continue reading

Tagged ,

Leverage browser caching with .htaccess

In this post we are going to talk about using browser caching using a .htaccess file. Leverage browser caching is used for caching static files (Images, CSS, JS, etc) to allow your websites pages to load quicker for returning visitors.

Tagged ,

Removing the .html extension using a .htaccess file

A customer recently asked me how they could remove the .html extension from their websites pages. Well here’s how you do it using a .htaccess file. Please note this will only work on our Linux hosting platform.

Tagged ,

Stop image hotlinking on your Linux account via a .htaccess file

Hot linking is linking directly to an image/images from another website instead of hosting the image yourself. Not only could this breach copyright for using images you do not own the rights to, but it also uses bandwidth that YOU … Continue reading

Tagged ,

Canonical (preferred) 301 redirect with a .htaccess file

If your website can be reached from more than one URL, for example http://yourdomain.co.uk/home or http://home.yourdomain.co.uk, for SEO (Search Engine Optimisation) purposes it is better to just pick one of these URLs as the preferred way to access your website.

Tagged ,

Logging PHP Errors using .htaccess

If you’re receiving an error code when accessing your website or it is not functioning the way you feel it should, logging PHP errors can help you identify what is causing your issues.   This short guide will walk your … Continue reading

Tagged ,

.htaccess cheat sheet

A quick cheat sheet for working with .htaccess files and Apache under Linux. Many of these options/features are also available via the control panel.

Tagged ,

Creating a .htaccess file

If you have a Linux web hosting plan then you can use the following instructions to create an .htaccess file

Tagged ,