If you want to redirect your domain in a webhosting package, you have to set up a Htaccess redirection.
In this tutorial, we will show you how to do this.
Open a text editor and create a file with this content:
RewriteEngine On
RewriteCond %{HTTP_HOST} (www\.)?mustermann.de
RewriteRule (.*) http://www.zieldomain.de/$1 [R=301,L]
Replace mustermann.de and zieldomain.de with your desired data:
mustermann.de = The domain that should be forwarded.
zieldomain.de = The domain to which the forwarding should be made.
Then save this file as ".htaccess".
Open a text editor and create a file with this content:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^mustermann\.de$
RewriteRule ^(.*)$ http://www.mustermann.de/$1 [R=301,L]
Replace mustermann.de with your domain:
mustermann.de = The domain that should be forwarded.
Then save this file as ".htaccess".
Open a text editor and create a file with the following content:
RewriteEngine On
RewriteCond %{SERVER_PORT} !^443$
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
Save this file as ".htaccess" afterwards.
For example, if you have a website in a subdirectory, but it is now should appear directly when the domain is called, you can do this as follows.
Open a text editor and create a file with the following content:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www.)?mustermann.de$
RewriteCond %{REQUEST_URI} ¶¶Subfolder/ ¶¶
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /subfolder/$1
RewriteCond %{HTTP_HOST} ^(www.)?mustermann.de$
RewriteRule ^(/)?$ subfolder/index.php [L]
Replace mustermann.de, "subfolder" and index.php with your desired data:
mustermann.de = your domain.
"subfolder" = The subdirectory in which the website is located.
index.php = can remain, unless an index.html or index.htm should serve as start page
Then save this file as ".htaccess".
Open an FTP program such as FileZilla and load the file into the root directory of your domain (default: /htdocs). Please make sure that the forwarding, which may be active for the respective domain via the customer area, is deleted beforehand.
Htaccess forwarding is active immediately.
Send an email
Telephone support