Answers for "htaccess redirect all www"

0

htaccess redirect non www to www https

# Redirect to HTTP non-www to HTTPS www htaccess

RewriteEngine On
RewriteCond %{HTTP_HOST} !^www. [NC]
RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301]
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://www.example.com/$1 [L,R=301]
Posted by: Guest on February-08-2021
0

.htaccess Redirects

Redirect /old_dir/ http://www.yourdomain.com/new_dir/index.html
Posted by: Guest on December-03-2021

Code answers related to "htaccess redirect all www"

Browse Popular Code Answers by Language