PDA

View Full Version : [ubuntu] .htaccess rewritten to htaccess.txt



jimallan
November 1st, 2012, 08:01 PM
Hi,
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 application...it 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

Jim

SeijiSensei
November 2nd, 2012, 05:20 PM
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.

jimallan
November 8th, 2012, 05:55 PM
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.

thanks