|
|
Question : Uploading .htaccess file
|
|
I'm trying to edit my .htaccess file on my website. All the file has in at a the moment is: Options -Indexes ErrorDocument 500 /customerrors/500.html ErrorDocument 404 /customerrors/404.html
This file was auto generated by my host when i changed the config of the custom error pages using thier built in control panel. This works sits on the server and works fine. If i donwload the .htaccess file and then upload it back to the server i get an error 500 on all the pages on my website. The only way to fix this is to delete the .htaccess file altogether.
So i can only assume the problem is something to do with the way i am saving or uploading the file, because the server generated file works fine and i know theres no errors i my .htaccess, and the site runs fine if i deleted the uploaded file, so i can only assume that i'm not uploading the file correctly.
I'm on a mac and i've tried using Dreamweaver and cyberduck to upload and my host is network solutions on a unix server.
|
Answer : Uploading .htaccess file
|
|
So if you just download the file, and then re-upload it unchanged you get this error?
If so, you are possibly uploading it in binary format instead of ascii...
If you can do a command line FTP session, you can set the upload type to ascii, i.e.
C:\>ftp domain.com Connected to domain.com. 220 ProFTPD 1.3.0 Server (ProFTPD) [0.0.0.0] User (domain.com:(none)): test 331 Password required for test. Password: 230 User test logged in. ftp> ascii 200 Type set to A ftp> put .htaccess ftp>
I am sure there are also some options in your FTP client that will change the upload method.
The only other thing I could think of is a permissions problem. Try to chmod the .htaccess file to 777 after uploading it and see if it still does the same thing.
|
|
|
|
|