1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

need quick htaccess help!

Discussion in 'Hire a Freelancer' started by Spawn, Sep 8, 2010.

  1. Spawn

    Spawn Jr. VIP Jr. VIP

    Joined:
    Jun 20, 2009
    Messages:
    1,166
    Likes Received:
    391
    Occupation:
    Quality Articles for $1
    Home Page:
    should take 5 minutes, just need a small tweak to change from a www. to regular http:// let me know! ill pay 5usd
     
  2. nufaman

    nufaman Elite Member

    Joined:
    May 29, 2009
    Messages:
    1,697
    Likes Received:
    1,185
    You mean www to non www?

    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^www\.domain\.com$ [NC]
    RewriteRule ^.*$ http://domain.com%{REQUEST_URI} [R=301,L]

    In both cases, make sure to replace "domain" with the URL of your domain.
     
  3. Spawn

    Spawn Jr. VIP Jr. VIP

    Joined:
    Jun 20, 2009
    Messages:
    1,166
    Likes Received:
    391
    Occupation:
    Quality Articles for $1
    Home Page:
    thanks but i have no clue where this is or how to change it.
     
  4. nufaman

    nufaman Elite Member

    Joined:
    May 29, 2009
    Messages:
    1,697
    Likes Received:
    1,185
    Do you know how to Ftp? You'll need to edit your .htaccess file and put that at the top of it
     
  5. Spawn

    Spawn Jr. VIP Jr. VIP

    Joined:
    Jun 20, 2009
    Messages:
    1,166
    Likes Received:
    391
    Occupation:
    Quality Articles for $1
    Home Page:
  6. Spawn

    Spawn Jr. VIP Jr. VIP

    Joined:
    Jun 20, 2009
    Messages:
    1,166
    Likes Received:
    391
    Occupation:
    Quality Articles for $1
    Home Page:
    10,can someone send me the code? urls are explained above.
     
  7. rannybo

    rannybo Junior Member

    Joined:
    Jul 7, 2007
    Messages:
    175
    Likes Received:
    54
    Like Nufaman stated above go get a FTP client like Filezilla.

    Go to public_html folder of your domain that your trying to change the www to non www

    Look for .htaccess file

    Open .htaccess to edit file

    Place the following code at the beginning of the .htaccess file:

    RewriteEngine On
    RewriteBase /
    RewriteCond %{HTTP_HOST} ^www.example.co [NC]
    RewriteRule ^(.*)$ http://example.co/$1 [L,R=301]

    Replace example.co with your domain name.

    Test your server to see if it works. You might have to restart apache.
     
    • Thanks Thanks x 2
    Last edited: Sep 8, 2010