Plz Help ASAP. Messed Up .htaccess

Discussion in 'Programming' started by gtull1, Feb 8, 2008.

  1. #1
    Please help.

    WordPress. I was trying to redirect www. myurl . com to just http:// myurl . com

    I found a place that said to add this to my .htaccess file: RewriteEngine on
    RewriteCond %{HTTP_HOST} ^www.yourdomain\.com$ [NC]
    RewriteRule ^(.*)$ http://yourdomain.com/$1 [R=301,L]

    I did that. Now the .htaccess file just says "O" and the site won't show up.

    I don't know the original .htaccess code to put back in the file.

    Can you help me please?

    Thanks!
     
    gtull1, Feb 8, 2008 IP
  2. gtull1

    gtull1 Guest

    Messages:
    619
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Not to bump, but I need to update.

    I deleted the weird .htaccess file that only had a "0" in it. Then I went into wordpress and updated my permalink structure. That created another .htaccess file on my root like the original one.

    Well, I still have a question about editing the .htaccess file to do that redirect thing. How do I do it correctly? I was editing the file through my host's editor.
     
    gtull1, Feb 8, 2008 IP
  3. olddocks

    olddocks Notable Member

    Messages:
    3,275
    Likes Received:
    165
    Best Answers:
    0
    Trophy Points:
    215
    #3
    just edit in your notepad and upload using FTP editor like filezilla to upload files like .htaccess. i had some weird things happening if i use web based online editors. dont use any other online editors.
     
    olddocks, Feb 8, 2008 IP
  4. gtull1

    gtull1 Guest

    Messages:
    619
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    0
    #4


    OK. I will try that. Thanks!
     
    gtull1, Feb 8, 2008 IP
  5. happyharry

    happyharry Peon

    Messages:
    93
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Have you solved this problem?
     
    happyharry, Aug 20, 2008 IP