Answers for "javascript redirect from www to non-www"

50

redirect via javascript

window.location.href = "http://mywebsite.com/home.html";
Posted by: Guest on July-18-2019
0

How to redirect non-www URLs to www

RewriteEngine On
RewriteCond %{HTTP_HOST} ^yourdomain.com [NC]
RewriteRule ^(.*)$ http://www.yourdomain.com/$1 [L,R=301]
Posted by: Guest on December-26-2019

Code answers related to "javascript redirect from www to non-www"

Code answers related to "Javascript"

Browse Popular Code Answers by Language