0
Welcome Guest! Login
0 items Join Now

Redirect http://yoursite.com to http://www.yoursite.com

    • Andy Miller's Avatar
    • Andy Miller
    • Preeminent Rocketeer
    • Posts: 9919
    • Thanks: 96
    • Web Kahuna

    Redirect http://yoursite.com to http://www.yoursite.com

    Posted 17 years 9 months ago
    • I had this asked a couple of times, so here's how you do it in your .htaccess file:
      RewriteCond %{HTTP_HOST} !^www.yourhost.com$ [NC]
      RewriteRule (.*) http://www.yourhost.com/$1 [R=301,L]
    • urj2ic8's Avatar
    • urj2ic8
    • Hero Rocketeer
    • Posts: 421
    • Thanks: 0

    Re: Redirect http://yoursite.com to http://www.yoursite.com

    Posted 17 years 9 months ago
    • Andy Miller wrote:
      I had this asked a couple of times, so here's how you do it in your .htaccess file:
      RewriteCond %{HTTP_HOST} !^www.yourhost.com$ [NC]
      RewriteRule (.*) http://www.yourhost.com/$1 [R=301,L]

      i've used this many a time on my sites, but do you know where to find a good tutorial to utilize mod_rewrite to do other things?
    • Billy Zoellers
  • Re: Redirect http://yoursite.com to http://www.yoursite.com

    Posted 17 years 9 months ago
    • Jordan's Avatar
    • Jordan
    • Elite Rocketeer
    • Posts: 613
    • Thanks: 0

    Re: Redirect http://yoursite.com to http://www.yoursite.com

    Posted 17 years 9 months ago
    • andy, does this help any PageRanking?

      My current XUS PageRank on www.xbo ... is 3, .xbo... is 0.
    • Andy Miller's Avatar
    • Andy Miller
    • Preeminent Rocketeer
    • Posts: 9919
    • Thanks: 96
    • Web Kahuna

    Re: Redirect http://yoursite.com to http://www.yoursite.com

    Posted 17 years 9 months ago
    • From what i've heard it should.
    • Franck's Avatar
    • Franck
    • Elite Rocketeer
    • Posts: 1049
    • Thanks: 0

    Re: Redirect http://yoursite.com to http://www.yoursite.com

    Posted 17 years 9 months ago
    • When I put this code in the top of .htaccess I have a 550 internal error. If I put the code at the end, I'm redirected to -http://www.yourhost.com ???
    • urj2ic8's Avatar
    • urj2ic8
    • Hero Rocketeer
    • Posts: 421
    • Thanks: 0

    Re: Redirect http://yoursite.com to http://www.yoursite.com

    Posted 17 years 9 months ago
    • Franck wrote:
      When I put this code in the top of .htaccess I have a 550 internal error. If I put the code at the end, I'm redirected to -http://www.yourhost.com ???

      you're supposed to change 'yourhost' to your domain name..
    • Billy Zoellers
    • Jordan's Avatar
    • Jordan
    • Elite Rocketeer
    • Posts: 613
    • Thanks: 0

    Re: Redirect http://yoursite.com to http://www.yoursite.com

    Posted 17 years 9 months ago
    • Franck wrote:
      When I put this code in the top of .htaccess I have a 550 internal error. If I put the code at the end, I'm redirected to -http://www.yourhost.com ???
      Franck... you suck :/ jk
    • Franck's Avatar
    • Franck
    • Elite Rocketeer
    • Posts: 1049
    • Thanks: 0

    Re: Redirect http://yoursite.com to http://www.yoursite.com

    Posted 17 years 9 months ago
    • Flipsider wrote:
      Franck wrote:
      When I put this code in the top of .htaccess I have a 550 internal error. If I put the code at the end, I'm redirected to -http://www.yourhost.com ???
      Franck... you suck :/ jk

      S@#"T!!! That's right! :-\ I pasted the code before read it! That's the problem when I'm doing hundreds things in the same time on the web. Building 3 sites and try the Andy code it's too much for my little head!
      For sure it's the more stupid post I wrote on the web :D
    • Last Edit: 17 years 9 months ago by Franck.
  • Re: Redirect http://yoursite.com to http://www.yoursite.com

    Posted 17 years 9 months ago
    • I have been wanting to do this for a while..but read that once you change your htaccess.txt file to a .htaccess file, you can only get back into the file if you have a program that can read hidden files through ftp. Is that correct? And if so, what do I need to be able to access the file once I make the change incase I do something wrong?

      Thanks,
      David Henderson

Time to create page: 0.060 seconds