Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.
Hi all, please see this major site announcement: https://www.boards.ie/discussion/2058427594/boards-ie-2026

301 redirect on Windows server (non-www > www)

  • 11-12-2010 12:32PM
    #1
    Registered Users, Registered Users 2 Posts: 2,985 ✭✭✭


    Simple really, I have a site which is hosted on a windows server so I can't use a .htaccess file and I would like to redirect the non-www version to the www version.
    What other methods are there to achieve this?
    Thanks :)


Comments

  • Registered Users, Registered Users 2 Posts: 674 ✭✭✭Freddio


    You can do this in the dns area of your hosting control. If its not obvious how to do it, contact their support, and they should be able to show you. For some systems its almost a hack :-(


  • Registered Users, Registered Users 2 Posts: 1,825 ✭✭✭Gambler


    How to code redirects in php, asp, cold fusion etc. etc. etc.:

    http://www.webconfs.com/how-to-redirect-a-webpage.php


  • Registered Users, Registered Users 2 Posts: 128 ✭✭johnny_rambo


    If you have access to IIS on your server, the following is probably easiest way to do a redirect from non-www to www.

    1) Create another website in IIS and point it at the same folder as the existing website.
    2) Set the website as a permanant redirection to: http://www.yourwebsite.com$S$Q
    3) Set the host header as: yourwebsite.com

    If you do this properly, all requests that come from http://yourwebsite.com will be redirected to http://www.yourwebsite.com


Advertisement
Advertisement