SitePoint Sponsor

User Tag List

Results 1 to 18 of 18
  1. #1
    SitePoint Enthusiast
    Join Date
    Aug 2007
    Posts
    58
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Unhappy Cannot find .htaccess file anywhere

    Hi,

    I have been given access to the FTP of a website. The URLs of this website have been rewritten. But I cannot find the .htaccess file anywhere in the code.
    What could be the reason?
    Last edited by minni; Jun 1, 2010 at 20:59. Reason: grammar correction

  2. #2
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,173
    Mentioned
    454 Post(s)
    Tagged
    8 Thread(s)
    When I log in to an online file manager, there is usually an option to "show hidden files". Otherwise, files like .htaccess aren't shown. See if you can find that option. How are you accessing the server? "FTP access" is a bit vague to me. Are you accessing the site vie something like CPanel?

  3. #3
    rajug.replace('Raju Gautam'); bronze trophy Raju Gautam's Avatar
    Join Date
    Oct 2006
    Location
    Kathmandu, Nepal
    Posts
    4,013
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Which FTP uploading software you are using? There is an option with Filezilla in the menu Server->Force showing hidden files.
    Mistakes are proof that you are trying.....
    ------------------------------------------------------------------------
    PSD to HTML - SlicingArt.com | Personal Blog | ZCE - PHP 5

  4. #4
    SitePoint Mentor silver trophy
    Rubble's Avatar
    Join Date
    Dec 2005
    Location
    Cambridge, England
    Posts
    2,397
    Mentioned
    81 Post(s)
    Tagged
    3 Thread(s)
    My server does not have a .htaccess file by default - does yours ?

  5. #5
    rajug.replace('Raju Gautam'); bronze trophy Raju Gautam's Avatar
    Join Date
    Oct 2006
    Location
    Kathmandu, Nepal
    Posts
    4,013
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by minni View Post
    Hi,
    The URLs of this website have been rewritten. But I cannot find the .htaccess file anywhere in the code.
    Quote Originally Posted by Rubble View Post
    My server does not have a .htaccess file by default - does yours ?
    .htaccess will not be in the server by default it is created later for rewritten purposes.
    Mistakes are proof that you are trying.....
    ------------------------------------------------------------------------
    PSD to HTML - SlicingArt.com | Personal Blog | ZCE - PHP 5

  6. #6
    SitePoint Enthusiast
    Join Date
    Aug 2007
    Posts
    58
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm using CuteFTP 8.1 Professional from GlobalSCAPE.

  7. #7
    rajug.replace('Raju Gautam'); bronze trophy Raju Gautam's Avatar
    Join Date
    Oct 2006
    Location
    Kathmandu, Nepal
    Posts
    4,013
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Step 1: Go to Sitemanager.
    Step 2: Choose the connection and click edit.
    Step 3: Make sure filters is checked.
    Step 4: Press the filter button towards the bottom.
    Step 5: Check [Enable remote filters (Server applied filter)]
    Step 6: In the box below add -al
    Step 7: Hit apply, now log in with that connection.
    Mistakes are proof that you are trying.....
    ------------------------------------------------------------------------
    PSD to HTML - SlicingArt.com | Personal Blog | ZCE - PHP 5

  8. #8
    SitePoint Enthusiast
    Join Date
    Aug 2007
    Posts
    58
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I just have the following in the site manager:


    General FTP Sites
    GlobalSCAPE Download Site


    I think, here I need to have my site also. What to do?

  9. #9
    rajug.replace('Raju Gautam'); bronze trophy Raju Gautam's Avatar
    Join Date
    Oct 2006
    Location
    Kathmandu, Nepal
    Posts
    4,013
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Click on the General FTP Sites and right click on the white area then click on New->Ftp and in the pop up box you can add the ftp information and connect it. And in the same dialog box you can find all those aforesaid.
    Mistakes are proof that you are trying.....
    ------------------------------------------------------------------------
    PSD to HTML - SlicingArt.com | Personal Blog | ZCE - PHP 5

  10. #10
    SitePoint Enthusiast
    Join Date
    Aug 2007
    Posts
    58
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by rajug View Post
    Click on the General FTP Sites and right click on the white area then click on New->Ftp and in the pop up box you can add the ftp information and connect it. And in the same dialog box you can find all those aforesaid.

    Okay, I have got my site in the site manager.

    And I have rt.clicked connection, chose actions tab,clicked on Filter, checked 'Enable server side filtering', entered -a in the textbox below, clicked on OK, clicked on Connect.

    I have reconnected many times, but still could not find the .htaccess file.

    Note: After clicking on the filter button in the actions tab, I get the 'Filter Properties' tab where I changed the Server side filtering part. The part above this has four options out of which, only the first one, that is, 'Enable Filtering' is checked. The rest of the three are however unchecked.

  11. #11
    Utopia, Inc. silver trophy
    ScallioXTX's Avatar
    Join Date
    Aug 2008
    Location
    The Netherlands
    Posts
    9,067
    Mentioned
    153 Post(s)
    Tagged
    2 Thread(s)
    There might be not yet be an .htaccess file
    Rémon - Hosting Advisor

    SitePoint forums will switch to Discourse soon! Make sure you're ready for it!

    Minimal Bookmarks Tree
    My Google Chrome extension: browsing bookmarks made easy

  12. #12
    rajug.replace('Raju Gautam'); bronze trophy Raju Gautam's Avatar
    Join Date
    Oct 2006
    Location
    Kathmandu, Nepal
    Posts
    4,013
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Did you do the following step correctly?
    Step 6: In the box below add -al

    '-al' should be typed in the text box below the check box.

    If still it does not work then there is no .htaccess file there in your folder. I can see the file here in my case.
    Mistakes are proof that you are trying.....
    ------------------------------------------------------------------------
    PSD to HTML - SlicingArt.com | Personal Blog | ZCE - PHP 5

  13. #13
    SitePoint Enthusiast
    Join Date
    Aug 2007
    Posts
    58
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes I have done it correctly. But cannot see the file.

    Is it possible for a site to have its URLs rewritten without having .htaccess file?

    Actually our site has many servers and I have been given access to one of them. Could that be a reason?

  14. #14
    SitePoint Enthusiast
    Join Date
    Aug 2007
    Posts
    58
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I have got access to a subdomain. And its the subdomain where URL rewriting has been done. Is it possible that the .htaccess file is placed outside the subdomain folder?

    Note: as far as I know .htaccess file should be in the same directory.


  15. #15
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,702
    Mentioned
    101 Post(s)
    Tagged
    4 Thread(s)
    .htaccess should be in the root directory, but it will only be there if it actually exists.

    Have you confirmed that the file already exists? Create a .htaccess file locally and try to upload it.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  16. #16
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,173
    Mentioned
    454 Post(s)
    Tagged
    8 Thread(s)
    Quote Originally Posted by pmw57 View Post
    Create a .htaccess file locally and try to upload it.
    As long as the purpose is to overwrite the original. If that's not the aim, this could cause trouble.

    Anyway, it can be hard to create a .htaccess locally. The way I have to do it is create a file called something like htaccess.txt, add in the required content, then rename it .htacess and then upload.

  17. #17
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,702
    Mentioned
    101 Post(s)
    Tagged
    4 Thread(s)
    Quote Originally Posted by ralph.m View Post
    As long as the purpose is to overwrite the original. If that's not the aim, this could cause trouble.

    Anyway, it can be hard to create a .htaccess locally. The way I have to do it is create a file called something like htaccess.txt, add in the required content, then rename it .htacess and then upload.
    As he has done just about everything he can to enable him to see it there if it were there, there's a very good chance that the file is actually not there and needs to instead be put there. If you get my drift.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  18. #18
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,173
    Mentioned
    454 Post(s)
    Tagged
    8 Thread(s)
    Sure, that's fair enough. I was just going on this original comment:

    Quote Originally Posted by minni View Post
    The URLs of this website have been rewritten...
    Figured it was worth a warning, anyhow.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •