Quickly create your.htaccess file The implementation of 301 redirections is a common referencing activity to solve broken links problems or to move a site. This online tool helps you create these redirections on the Apache server used by most hosting providers. CMS systems such as WordPress, Joomla and Magento are normally on this type of server. An.htaccess file is a file on Apache servers used for several things, including controlling the processing of different URLs. A common use is when a website is rewritten and you want to redirect all users who visit your old pages to the new ones. In the.htaccess file, this is done by adding RewriteRules that cause 301 redirections from one page to another. Permanent 301 Redirection is the best way to perform a redirection because it also tells search engines to update their indexes. The manual creation of these RewriteRules can be time-consuming and error-prone.
This tool will generate the rules for you. Enter a comma or tab separating the lists of old and new pages, then click on the Generate button. Copy the resulting code into your.htaccess file and check if the pages are redirected as planned. I find the easiest way to do this is to create an Excel file with two columns. Place the old pages in the first column and the new pages in the second column. Then, simply copy and paste the cells into the form below. All you have to do is enter the path for each page and not the complete URL, for example aboutus.htm. The simple fact of using access paths means that the generated rules are independent of the domain name. If you enter the full URL, the generated code will also take into account the domain. This way, you can ensure that the rule applies to only one domain or that the redirection switches to another domain. You can create the.htaccess file using a good text editor such as TextPad, UltraEdit and Microsoft WordPad.
You cannot use Microsoft NotePad. You can enable password protection, redirect to a custom error page if a user fails to log in, or redirect to a custom page if a user encounters an error. An.htaccess file can contain one or more lines depending on the functions you want to include. You will need to use an FTP (File Transfer Protocol) program to download the file. You must also download the file in ASCII mode. Some FTP programs use BINARY by default to download files. If this is the case, you must change it to ASCII. When you look at the files in the directory of your website, you may not see it because the software on your web server probably hides it. Error handling The.htaccess file is very useful when it comes to handling errors. Visitors get irritated when they encounter an error message such as a 401, 404, 500 message on a website. This is where the.htaccess file can be used to display a friendly message to visitors in case they have problems accessing your website. Rerouting Redirections allow a webmaster to redirect visitors to your website from one page to another within the site. You can also redirect a visitor to another website. It is a very useful tool when webmasters do not want visitors to see certain pages of the site. Password protection This is probably the most important function that a webmaster might want to incorporate.
They do not want anyone not to be allowed to visit and access the site. For example, you must have a valid username and password to access your email account. When password protection is provided, the user feels more secure when sharing information on this website. Even popular social media sites are password protected. To protect your website by password, you will need to place some instructions in your.htaccess file. Refuse visitors Again, this function can be incorporated into your website using the.htaccess file. Some sites do not want visitors to certain IP addresses to access their site. This function is extremely useful for blocking unwanted visitors. The webmaster can choose the IP addresses that allow him to visit the site and from which IP addresses he blocks visitors.
In most cases, webmasters allow visitors to a specific range of IP addresses and thus automatically block visitors from any other IP address. Organizations, government agencies use this feature to block unwanted visitors. If you encounter a number of visits from an unknown site, you can block that site in case you think it might pinch your CSS files. You can also refuse access by referrers. Redirection generator.htaccess Placing all the commands that webmasters may want in the.htaccess file on the web server requires that they know the html code. Yes, the commands that the.htaccess file must execute can be created using a text editor but cannot be placed as a tool. To redirect from non-www to www or from www to non-www there is a.htaccess tool available on checkergooglerank.com. If you want the tool to generate the code to include in the.htaccess file of your site, navigate to checkergooglerank.com from your search.