Results 1 to 3 of 3

Thread: .htaccess rewritten to htaccess.txt

  1. #1
    Join Date
    Nov 2012

    .htaccess rewritten to htaccess.txt

    first post.
    New to Ubuntu (coming from Solaris)
    have LAMP installed (Bitnami)
    setting up an application that has an htaccess.txt file.
    I configured Apache to AllowOverride All
    mv htaccess.txt .htaccess
    then ls -al
    all ok
    then I go to the browser and try something in the fails...can't find some files
    go back to the directory and the .htaccess file is gone and htaccess.txt has reappeared!!??!!

    any ideas? this is weird


  2. #2
    Join Date
    Nov 2008
    Metro Boston
    Kubuntu 14.04 Trusty Tahr

    Re: .htaccess rewritten to htaccess.txt

    Try creating a "symbolic link" between the two names like this:

    $ mv htaccess.txt .htaccess
    $ ln -s .htaccess htaccess.txt
    Now the same file exists with both names.

    This shouldn't be a problem in general, though. Are you using any form of Windows web services like ASP pages, .NET, or the like? *nix systems do not use file extensions to identify filetypes like Windows does, so typically only a Windows-based application of some sort would create a file named "something.txt". It's also possible the developer of the application expected it to be running on a Windows server and wrote the application to use Windows file naming constructs.

    If you have the application's source code, try using "grep htaccess" against the source code files to see if you can find the reference to htaccess.txt. Try changing it to use .htaccess instead.
    Last edited by SeijiSensei; November 2nd, 2012 at 05:23 PM.
    If you ask for help, please have the courtesy to check for responses and thank the people who helped you.

    Blog · Linode System Administration Guides · Android Apps for Ubuntu Users

  3. #3
    Join Date
    Nov 2012

    Re: .htaccess rewritten to htaccess.txt

    Thanks for that. Had a CPU issue to be resolved before I could get back to you. I did all of the above. remarkably it erased the .htaccess and symbolic link and reestablished the htaccess.txt. I did the grep htaccess on the source code and only found references in comments. Sigh. I believe I will remove the application and start fresh.



Posting Permissions

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