I'm having trouble adding new page to my PHP website. I'm working on a project where previous developer has created two pages, "index" & "search". I'm completely new to PHP, so the problem may be something obvious..
Index is just a frontpage where users can make simple calculations. "search" shows calculation results. User can open "search" just by clicking a button on "index". This works completely fine.
However, now I'm adding a new page (about) & when I'm trying to open it, error "The requested URL was not found on this server" appears. (404 Not Found).
I created the new file to the root next to "index" & made sure everything is correct.
Links
http://localhost:84/Projects/Calculator/Calculator/index.php <-- WORKS
http://localhost:84/Projects/Calculator/Calculator/search.php <-- WORKS
http://localhost:84/Projects/Calculator/Calculator/about.php <-- DOES NOT WORK
What have I tried?
1)First I made a button which links to the new page. Since this didn't work, I also tried to insert new pages link directly to the browser. Didn't work this way either.
2)Created multiple test files to the project with basic html code structure. None of them opened in the browser, always the same error. (Also tried to create them on different levels, next to root etc..)
3)Created completely new project just to test and created multiple pages there. Every one of them worked!
CodePudding user response:
You can try by copying index.php file and save it as about.php. And then open file in browser. If it works, then edit about.php file with your desired content.