Report this

What is the reason for this report?

How to enable clean url on Debian 9?

Posted on February 14, 2019

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!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
0

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

Thank You Jarland,

the first way looks interesting.

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.