eMARKETING RELATIONSHIPS THAT CLICK
Written on Thursday, 25 March 2010 by Matt Johnston
Viewed 1863 times so far. Like this? Tweet it to your followers!

Redirecting a site from non-www to www is pretty straight forward using .htaccess, but not so much when you are on a Windows box. The approach usually taken invloves pasting code (below rewrite engine on)  in the .htaccess file and uploading to the server in the root.

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

The steps for IIS redirect is a different story, and most the time you do not have access to do this.

  1. Go to IIS on the server and right click / select properties on the domain you want to do this for
  2. On the Web Site tab (the one already selected), clicked Advanced next to IP Address
  3. Under "Multiple Identities for this website", if there's a record there without "www" (e.g. yourdomain.com), select it and remove it.
  4. Click OK, Apply (to close these windows)
  5. Now add a new website to IIS by right-clicking on "Web Sites" > New > Website
  6. Call the description something meaningful like "yourdomain.com redirect". Click Next.
  7. In the "Host header for this Web site", enter your domain name WITHOUT www - e.g. yourdomain.com
  8. Select a path for the website. It's best to point this domain to an empty folder (just make one up) somewhere on your server (as this domain isn't going to be used to host anything).
  9. With this new website added, right click on it in IIS and select Properties, and select Home Directory
  10. Now click on the radio button next to "A redirection to a URL", and enter this in the textfield below :-
    http://www.yourdomain.com$S$Q (replace "yourdomain" with your actual domain name)
  11. Now tick the box next to "The exact URL entered above", and also tick the box next to "A permanent redirection for this resource". Click OK and Apply

 

Joomla Extension wwwRedirectQuite a big difference, well thanks to a handy plugin, the process is oh so simple now. With the plugin wwwRedirect by Radoslaw Kubera, once installed you can select www to non-www OR non-www to www redirect.

How Simple was that?

It seems the Joomla.org link is down, in the mean time, you may try this plugin instead.

Download his plugin from the Joomla Extensions here.

 


blog comments powered by Disqus

Rate this article

(0 votes)

Latest articles from Matt Johnston

Latest 'tweets' from Atomic DC

  • Let your site map be your guide! Find out more about site maps and why you should be using them. http://t.co/Tvze0m70 Link Wednesday, 16 May 2012 04:48
  • Add posting just a link with nothing else MT @PublicityGuru: 10 Things That Make You Look Like A Twitter Spammer http://t.co/IJ8jzkm5 Link Monday, 14 May 2012 09:51
  • A big Thank You to all those who came out to celebrate Atomic's 10th anniversary on Friday. Pictures are up at http://t.co/eqLYEkzr Link Monday, 14 May 2012 07:46

Dallas Digital Marketing Agency - Get Started

Atomic Advantage Our Dallas web design team reviews your web site, conversion strategies, social media performance, and search optimization strategies. One of our biz dev team will review the results and share recommendations to improve your results!
  1. Name(*)
  2. Company
  3. Website Address(*)
    Invalid Input
  4. Email(*)
    Invalid Email Address. Please check to make sure you typed it correctly.
  5. Phone
    Invalid Phone Number. Try using the following format: 123-456-7890
  6. Invalid Input

Digital Agency Relationship - Meet us on Facebook