Hi,
I want to redirect pages e,g 'http://mydomain.com/pagename.html' to 'http://www.mydomain.com/pagename.html",i.e if anyone access without www then it will be added automatically,how can i do this using javascript?
plz help
Thanks
redirect pages to www using javascript
Moderator: General Moderators
Re: redirect pages to www using javascript
Why would you need to do this? most browsers auto fill in www.
Either case, it would be easier to set up your .htaccess file to do this. That way you don't have to post this code on every page on your site.
Either case, it would be easier to set up your .htaccess file to do this. That way you don't have to post this code on every page on your site.