For example, if you have a website in a subdirectory, but it is now is to appear directly when the domain is called, you can change this via a htaccess file.
In this tutorial, we will show you how to do this.
Open a text editor and create a file with the following contents:
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 Main directory of your domain (default: /htdocs).
Htaccess forwarding is active immediately.
Send an email
Telephone support