• Hi, this one is driving me crazy, I cannot edit htaccess without it throwing a 500 error, even if I just open it in FileZilla and do nothing and save it my site gives me a 500 error. If I transfer the file to my PC and transfer it back without editing it then no error but if I edit it at all, even just a simple comment tag then error. Only happens on my wordpress site, no problems editing htaccess files on my other sites, using the same VPS. Any ideas at all, I am going bonkers.

    • This topic was modified 4 years, 6 months ago by Jan Dembowski.
Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi @gmmd, do you have any security or caching plugin controlling/adding rules to your .htaccess file?

    The easiest way to troubleshoot this is to disable all your plugins and try editing the file to see if it still throws up the error. If it doesn’t, then it’s definitely a plugin that is causing the issue.

    Let me know what you find.

    Thread Starter gmmd

    (@gmmd)

    Hmm just noticed when I save it the file size gets bigger without making any modifications, if I open it in notepad it is like it is minified hence giving me errors, any other editor and it looks as it should be, if I copy it to a test folder on my site and edit it and save it doesn’t happen. So maybe a plugin monifying it in real time? gah I have no idea. Trial and error with plugins I guess.

    With FileZilla, you might want to check which transfer mode it’s using:
    FileZilla -> Transfer -> Transfer Type ->

    By default it should be set to “Auto”, but you might try changing it to “Binary”.

    Sorry for jumping in… Could you let me know Where do I edit .htaccess? I can’t find it anywhere. I am using apache server type

    Thread Starter gmmd

    (@gmmd)

    In the root directory, are you using file manager in cpanel? If so you might have “show hidden files” unchecked.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Editing .htaccess’ is closed to new replies.