Hello,
I have a website and for example I have url like this “example.com/games” and it should show the page with games but it shows error:
Not Found
The requested URL /games was not found on this server.
What I have to do to show a page instead of an error?
Thanks!
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Accepted Answer
Hey friend!
Good question. There are different ways to handle this. The easiest example would be to create a folder named “games” in the website’s document root, and then add an index file which contains your content.
A more common example these days is to use your web server’s rewrite functionality to funnel all URLs into index.php which translates the URL into the right content request, returning the desired content based on the URL given. Wordpress does this on Apache by writing rewrite rules to a .htaccess file in the website’s document root, for example.
Jarland
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.