I'm very new to web development, and know nothing of back-end dev. I have a website hosted by a 3rd party on a Linux server, using cPanel.
I have a index.html page that is loaded when you go to the website www.domain.com and I have a second file page2.html that loads when I go to www.domain.com/page2.html
Problem 1:
I want to be able to go to www.domain.com/page2 and have page2.html load.
Problem 2:
When I go to www.domain.com/page3.html (which doesn't exist) or www.domain.com/page3 or any other non-existent url index.html loads instead of giving me a 404 error. I have made a custom 404 page (404.shtml) which is in the same directory as index.html and page2.html (/public_html/).
How do I get this 404 page to show when I go to a non-existent URL? I checked the error log on cPanel and it shows a File does not exist error.
[Fri Aug 29 20:16:48 2014] [error] [client ...*] File does not exist: /home/adminName/public_html/page3, referer: http://domain.com/page3/
Any pointers in the right direction would be very helpful.