Translate

Translate to German Translate to Spanish Translate to French Translate to Italian Translate to Portuguese Translate to Japanese Translate to Korean Translate to Russian Translate to Chinese

I'm a KONTERA Partner! Sign up and start making money on your site too!

Categories

More FREE Stuff

- Atomic Blogging 2.0 Leak Copy
- Blogging Videos
- Explode your Adsense earnings get Adsense Secrets 4.0 for only $9.95



Htaccess to add www to all pages of a site

Filed Under (How To, SEO, Site maintenance, Webmaster Tips) by Tricia on 08-06-2007

I’ve been trying to work on my htaccess file for one of my other domains feverishthoughts.com for a few weeks. What I’d like is for the main website on feverishthoughts to have www in the url but ever new htaccess code that I’ve tried seems to fail and worse often ends up messing up how my site works.

I’m so frustrated I could start throwing folding chairs, and other things around!

I mentioned my problem in a forum and wrote a post about it on my main blog and some people have been very nice and offered up codes to try but nothing is working.

If anyone reading this post has an htaccess code for me to try that will put www in all the urls for my main blog even if they came to the site using a link without the www I’d appreciate it.

I wonder if part of the problem is that this domain thewebfiles.com is the main domain on my server?




Add this to : Digg! Digg it Bookmark! Save to Del.icio.us Subscribe to RSS Subscribe to My RSS feed
Tags: , , , , , , , , ,

Related posts



Comments:

3 Responses to “Htaccess to add www to all pages of a site”


  1. MyAvatars 0.2

    You might also want to set up redirects from the http://www. to the non www or vice versa so that you get a compounding effect from incoming links, because search engines treat the 2 url versions differently, but the redirect combines the link love.


  2. MyAvatars 0.2

    How about this one?

    Options FollowSymlinks
    RewriteEngine on
    rewritecond %{http_host} ^domain.com [nc]
    rewriterule ^(.*)$ http://www.domain.com/1 [r=301,nc]

    The first line isn’t necessary. This code works for all of my domains perfectly.


  3. MyAvatars 0.2

    @jan -
    Thanks for that, but there is a typo in there:

    the last line should have a dollar sign before the numeral 1 e.g.

    rewriterule ^(.*)$ http://www.domain.com/1 [r=301,nc]

    Thanks, tho


Leave a Reply