1. Home
  2. Technical
  3. 301 redirect with .htaccess file

301 redirect with .htaccess file

To redirect web-traffic the following lines of code are entered with text editor (Notepad, WordPad etc.) and then saved as .htaccess file. The .htaccess file must be uploaded to htdocs folder on the server.

These lines can also be added to existing .htaccess file on your server.

Options +FollowSymLinks
RewriteEngine On

RewriteCond %{HTTP_HOST} ^(www\.)?domeen\.eu$ [NC]
RewriteRule ^$ https://www.zone.ee/et/ [R=301,L]

Result: web traffic for domain domeen.eu is redirected to https://www.zone.ee/et/ .

Updated on 28. Oct 2019

Was this article helpful?

Related Articles