Htaccess Redirect Generator

1. Select redirect type

2. Geben Sie Ihren Domain-Namen ein

Do not include www. Domain name only - e.g.

3. Get your code

4. Copy the code to your .htaccess file

Über Htaccess Redirect Generator

What is the .htaccess code?

The web hosting server that has the Apache software installed, .htaccess is a configuration file named ".htaccess" that controls the basic behavior of the website. .htaccess is shorthand for hypertext access. This file is placed in the root directory of the Apache web server, and at first it is hidden, we have to show the hidden files to view it. This file will find and execute the following commands on the server. Also check your server status using the helpful Check Server Status  tool This file will perform the following tasks.

  • Manages the configuration of the Apache web server
  • Enable / disable functionality and many features
  • Handling redirects with and without www
  • Protecting user information and passwords
  • Can block or access an IP address
  • May redirect visitors to other websites or links

There is a large list of other controls that the .htaccess file can execute. We cannot change the file name or file extension. Apache will only consider the filename and extensions (.htaccess) in the root directory and ignore all other names or extensions. 

How do I create a .htaccess file in notepad?

A fully functional file with some line codes can be created in any text editor. You can use TextPad, WordPad, Sublime Text, Atom, notepad ++, or Microsoft WordPad. But be aware that Windows Microsoft Notepad cannot be used to edit this file. This file can be used for any functionality such as password protection, redirecting specific pages, handling file errors, or redirecting to a custom page in the event of a user's login failure. The file generated for .htaccess can be very simple or long depending on the use of the file and functions. You can upload your file to the server through any FTP client or directly on the Cpanel file uploader page, but use only ASCII mode for uploading, otherwise the file may not work correctly. If you are using a binary system to boot, the file may contain errors. Apache keeps this file hidden by default, but you can buy it to find hidden files. Htaccess file is stored in the main root directory of any website.

The main feature of the .htaccess file is:

Redirect function:

You can use the .htaccess file to redirect. Webmasters and site owners mostly use the code in this htaccess file to send some special links to specific pages. 
This feature can send your visitors to any site. If you want to prevent this user from seeing a specific page, you can write this in the .htaccess file to send the person to a different location. Check if your page is configured with redirection with the simple www Redirect Checker tool .

Error processing:

You can see that if you have visited the wrong page by mistake, then this page will be redirected to some specific developed pages, showing that an error has occurred, you can view this page later. If the page is not configured for some specially designed page, then the user is annoyed and will not go to this site any more. Thus, some pages like 401, 404, 500 are designed to set a custom message, redirecting it to work pages. This way, we just get a good user experience by providing useful information to our visitors. 

Htaccess file is very helpful in error handling. Visitors get annoyed when they encounter an error message like 401, 404, 500 on a website. Here, the .htaccess file can be used to display a friendly message to visitors should they encounter any problem while accessing your website.

Password protection:

Password protection is an important feature of this file. 
Htaccess file may have some special instructions that will save your password and will not be visible to users publicly. You may have that most high quality websites also have password protection features that make visitors more secure and build their trust in the website. Once you have a username and password, it will be convenient for you to log in without having any information. 

Deny. Block or Allow:

Htaccess file has a special feature that the web hosting service cPanel uses by default with a custom user interface. Using these features, you can block visitors by tracking an IP address, block it permanently, or only allow some special IP addresses. Check your IP address with the simple What's My IP Address tool   . Unwanted traffic can be blocked with a simple line of code in the .htaccess file located in the root directory. 

Htaccess redirect generator

Htaccess redirect generator is the most useful and common tool to help webmaster. You may have a lot of experience with HTML coding or PHP functions. The .htaccess tool has a very nice feature to redirect your pages to complete your www or non-www version of a website. 
In this regard, our tool is very simple and useful. 
To redirect from non-www to www or www to non-www, this dedicated tool with a simple interface will work 100% for you and you will see the magic in the code that is generated by the .htaccess redirect generator. If you want to convert your website from www to www instead of www to www, then you have a very simple tool that does it all for you. Just add a version of your website without http: // or https: // and choose the format you want. Click on "Get .htaccess Code" and you will see that a code has been generated for use on your website. Get your HTTP headers with a simple Get HTTP Headers tool   .
It's time to copy the generated code into the .htaccess file located in the root directory. 
After updating the file, you will see that the website has changed from www to non-www version or non-www version to www version.

Other tools :