How to edit .htaccess?

Discussion in 'Site & Server Administration' started by Forum-Angels, Oct 14, 2006.

  1. #1
    I think the title of the topic says it all, how do I edit my .htaccess file?
     
    Forum-Angels, Oct 14, 2006 IP
  2. mad4

    mad4 Peon

    Messages:
    6,986
    Likes Received:
    493
    Best Answers:
    0
    Trophy Points:
    0
    #2
    You may not have one.

    If you don't then just create one using notepad and call it .htaccess and upload it to the main directory of your site.

    If you do have one you can just download it via ftp and edit it in notepad.

    Make sure your ftp client is set up to view all files otherwise you may not see it.
     
    mad4, Oct 14, 2006 IP
  3. Forum-Angels

    Forum-Angels Peon

    Messages:
    469
    Likes Received:
    34
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Ok, I have 3 sites on my server though so will it be in the root of all 3 sites or will ther ebe one in each individual directory for each site?
     
    Forum-Angels, Oct 14, 2006 IP
  4. rosytoes

    rosytoes Peon

    Messages:
    230
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #4
    If there isn't one in the individual sites' root directory, the one in your server root will be used. So it depends if any .htaccess exists on each of your site. If there is one in your server root AND in your individual site root, then the latter will be used.
     
    rosytoes, Oct 14, 2006 IP
  5. Forum-Angels

    Forum-Angels Peon

    Messages:
    469
    Likes Received:
    34
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Ok thanks I found it and its in the main root directory before the sub folder sites.

    Thanks just needed to know what program to open the thing with :)
     
    Forum-Angels, Oct 14, 2006 IP
  6. TuesZ

    TuesZ Well-Known Member

    Messages:
    934
    Likes Received:
    66
    Best Answers:
    0
    Trophy Points:
    163
    #6
    Open it with notepad but make sure you don't change the name. If you have a cpanel host you can use the file manager and directly edit the file
     
    TuesZ, Oct 16, 2006 IP
  7. Forum-Angels

    Forum-Angels Peon

    Messages:
    469
    Likes Received:
    34
    Best Answers:
    0
    Trophy Points:
    0
    #7
    I have done it all ready :)
     
    Forum-Angels, Oct 16, 2006 IP
  8. intoex

    intoex Peon

    Messages:
    414
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #8
    btw, .htaccess often is hidden and, for example, in my ftp client it's not shown. I need to manuall type ftp commands: GET .htaccess to get it or DELE .htaccess to delete it.
     
    intoex, Oct 19, 2006 IP
  9. Forum-Angels

    Forum-Angels Peon

    Messages:
    469
    Likes Received:
    34
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Thanks anyway but like I said allready did it :D

    Thanks.
     
    Forum-Angels, Oct 19, 2006 IP
  10. damnidunno

    damnidunno Well-Known Member

    Messages:
    1,286
    Likes Received:
    22
    Best Answers:
    0
    Trophy Points:
    155
    #10

    you can usually set up the ftp client filters to see these hidden files. That way you don't have to use commands or anything :d
    I did it with cuteftp.
     
    damnidunno, Oct 19, 2006 IP