Hey there, I am trying to use a custom .htaccess file but everytime I put it inside my root directory I get the following error:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator at webmaster@localhost to inform them of the time this error occurred, and the actions you performed just before this error.
More information about this error may be available in the server error log.
This is how my file looks like:
ErrorDocument 404 /404.html
And this is 404.html:
<meta name="viewport" content="width=device-width, initial-scale=1.0">
The file looks OK to me, but I haven’t done much work with these files. My two thoughts:
- Have you contacted your host? They may have some weird setup.
- You’re starting a filename with a number? Some systems don’t allow that. I might try renaming it, maybe e404.html or something.
This shifted the problem in an other direction. The page now load good and everything seems fine until I try to access a non existent file. Then I get the same error as before
Did you change it in both places? Did you refresh the page? Try opening it in an incognito browser.
If you mean with “in both places” the root directory(the file name itself) and the .htacces file, yes I did so. And i reloaded the page and used the incognito mode.
Well, then sorry, you’ve exhausted my knowledge. If you don’t get an answer here, this might have better luck on Stack Overflow.
Thanks for your time, I will try it there