The visitor blocking facilities offered by the Apache Web Server enable us to deny access to specific visitors, or allow access to specific visitors. This is extremely useful for blocking unwanted visitors, or to only allow the web site owner access to certain sections of the web site, such as an administration area.To set-up visitors restrictions and blocking, create a .htaccess file following the main instructions and guidance which includes the following text: Read more…
Description of the problem:
Your website can be accessed with www.domain.com and domain.com. Since Google penalizes this due to duplicated content reasons, you have to stick your domain to either www.domain.com or domain.com.
But – since some links are outside of your website scope and the search engines already have indexed your website under both addresses, you can’t change that easily. Read more…
The easiest htaccess trick is to make sure that your site doesn’t have any canonicalization issues on the homepage.
A lot of websites suffer from poor search engine rankings by having a number of different versions of the homepage, for example:
These pages are all seen as different urls, despite them having exactly the same content in most cases. Google has got better at deciding which version to use over the past 12 months but you can still run into problems.
To solve this issue simply add the following to your htaccess file: Read more…
I hate spam, i received since i created my first email account and i am always interested in web development tricks and techniques for protecting email accounts. Recently i read book about email security and found there very interesting technique which allows users to send email to you while proveiding email harvester with completely false email address, i created variation of this trick which i will share here as well.
First method requires, to create a new fail let’s call it my_false_email@not_exisiting.com, if you are unsure then: YES, file should be named like a valid email address, any UNIX system should handle such file. Next thing we need to do is add following lines in .htaccess file: Read more…
I hope you have gone through the examples listed in first part of this tutorial. If not, it’s here – [Beginners guide to .htaccess file with examples].
In this part, we will cover more examples with .htaccess file.
Presenting custom error pages
Use .htaccess file to present users with your custom pages for 401 [Authorization Required], 403 [Forbidden], 404 [not found] and 500 [Internal Server Error]. Read more…
htaccess file allow us to make configuration changes on a per-directory basis. htaccess file works in Apache Web Server on both Linux/Unix and Windows operating system. This article has some basic .htaccess examples, such as htaccess redirect, to get you started with .htaccess right away. Just copy and paste the lines mentioned in this post below, with or without any modification, in your .htaccess file and it should work.
There are several things that developers, site owners and webmasters can do by using .htaccess file. Let’s look at some of them: Read more…