htaccess Redirections Print

  • 86

.htaccess is a very versatile tool to create restrictions, permissions and general rules for your domains and subdomains, without affecting your emails or other settings of your website.

Please note that .htaccess is normally not visible, so your FTP client or file manager should always be set to see hidden files.

301 Redirection (Permanent)

This is a redirection to another domain that is permanent

Redirect 301 / http://your-domain.com/


302 redirection (Temporary)

This is a redirection to another domain that is temporary, usually used for SEO purposes, telling search engines that it will revert back to the original domain

Redirect 302 / http://your-domain.com/

Define the index file

  DirectoryIndex index.html

Set index.html to redirect to a subdirectory

Redirect /index.html http://your-domain.com/subdirectory/

Was this answer helpful?

« Back