Forum Moderators: phranque
So far so good. But every time I upload any htmaccess file to my server -- even an exact copy of the htmaccess that was already working -- the rewrite rules stop functioning.
This general problem was happening before I even hired someone to work on the rewrite rules in my htaccess file. Every time I uploaded an htaccess file -- even if it contained no changes from the one that was there before it -- my site would often crash and I'd need my service provider to intervene (though, unfortunately, they were never very good at telling me how they fixed things, though they suggested that the hmaccess files was somehow corrupt).
Before anyone speculates on the reason(s) for my inability to upload htmaccess files without problems (or potential code corruption?), they should know that I've specifically requested my FETCH FTP program to upload such files in ASCII mode (even tho' it should be doing so already via its default auto mode)
I've also tried saving my htaccess file on TextEdit and on TextWrangler, both of which were set to ascii saving mode. I've even tried uploading the files through my service provider's file manager interface instead of through my FTP client.
Still, inevitably, the rewriting rules crap out on me after I upload my htmaccess file, even though the exact same file works fine when uploaded by someone else to the same place.
I've read many htaccess tutorials, but so far can see no sign as to why this is happening.
In case it matters, I have an Apple iBook 10.4.11, using FETCH ftp client, using Mac TextEdit & also TextWrangler.
44 69 72 65 63 74 6F
One other fact I can point out is: I am unable to save files on my computer when their file name begins with a "." so I have to upload the file with some made-up name (like 00000htaccess) and then rename it as .htaccess after the upload. I can't see how this would create the sort of problem I'm having, but I thought I'd mention it just in case.
Your editor is probably sending a CR/LF at the end of each line whilst the server needs unix format.
Check for a setting on your ftp client. Try a different ftp client. It would be better to use a secure one such as WinSCP or other type of sftp.
44 69 72 65 63 74 6F
D i r e c t o
So it's not tagged as UTF-8, and the line-ender issue is the only other one that's likely. Although, it could be an 'endian' problem, and that again would be a editor compatibility issue.
Jim