Jk
In Runtime
- Messages
- 236
Well, I got bored and decied to try and make a 404 page on my server. Google made it seem really easy. I just have to edit my .htaccess and tell it to open a certain html file when it encounters a 404. I didn't have a .htaccess in my root folder so I made a blank file and named it .htaccesss. I pasted this in the file.
ErrorDocument 404 /404page.html
I saved it and then made a html file with some text in it and saved it as 404page.html. I opened a ssh and ran "sudo chmod 644 .htaccess" to make sure permssions were correct. I also restarted apache for good measure.
I go to a page that doesn't exist and I get the regular 404 error. Does anyone know why this didn't work for me? This is not the first time I had problems with .htaccess. I tried to password protect a folder before using .htaccess and I couldn't do it. I just assumed that it was something I did wrong and forgot about it. I'm guessing apache isn't looking for .htaccess or something, is there something I have to enable in apache2.conf or httpd.conf?
I am running apache 2.2.8 on xubuntu.
ErrorDocument 404 /404page.html
I saved it and then made a html file with some text in it and saved it as 404page.html. I opened a ssh and ran "sudo chmod 644 .htaccess" to make sure permssions were correct. I also restarted apache for good measure.
I go to a page that doesn't exist and I get the regular 404 error. Does anyone know why this didn't work for me? This is not the first time I had problems with .htaccess. I tried to password protect a folder before using .htaccess and I couldn't do it. I just assumed that it was something I did wrong and forgot about it. I'm guessing apache isn't looking for .htaccess or something, is there something I have to enable in apache2.conf or httpd.conf?
I am running apache 2.2.8 on xubuntu.