Home
/
Website Help
/
Other
/
How can I enable Mod-Rewrite Module?

How can I enable Mod-Rewrite Module?

To enable mod_rewrite, add the following line in the .htaccess file of your website:

RewriteEngine On

After that line, place your custom rewrite rules.

For example, if you wish to redirect your domain to an HTTPS connection, place the following lines in your .htaccess file:

RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://yourdomain.com/$1 [R=301,L]

You can edit the .htaccess file using with the File Manager in Site Tools, or via FTP.

Share This Article