301 redirect is one of the excellent technique when we want to redirect from one url to another permanently. This “301″ moved permanently code which tells search engine that the url is permanently changed and help to transfer 90-99% of link juice to new url. 301 redirect is most effective and search engine friendly method of url redirection.
Here are some 301 redirect method for different programming language and .htaccess
IIS Redirect
- In internet services(IS) manager, right click on the file or folder you want to redirect
- Select the radio titled “a redirection to a URL”.
- Enter the redirection page or url.
- Check “The exact url entered above” and the “A permanent redirection for this resource”
- Click on ‘Apply’ Read more…
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…
Canonicalization
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:
http://www.yoursite.com
http://yoursite.com
http://www.yoursite.com/index.html
http://yoursite.com/index.html
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…