0

i am doing one site(https://www.mazabhumirakshak.in).Below is my issue:when user enter only mazabhumirakshak.in in URL then entry should redirect directly to www.mazabhumirakshak.in in background. I have created this site using Node,Mongo,express and Angular(MEAN stack). Your help will be valuable for me.

Thanks, Guru

Gerard
  • 15,418
  • 5
  • 30
  • 52

1 Answers1

1

on your Webserver you can crate a file .htaccess and insert the following code

RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L

Complete answer here

https://stackoverflow.com/a/12050652/7883023

RacoonOnMoon
  • 1,556
  • 14
  • 29