I have a domain name and on FTP is the only one file – index.php. In this file are just information about my project – simple HTML.
Now I would need to set some information to URL, like
http://mywebsite.com/some-words
If in URL address would be this string, I need to get the string (some-words) and take a look at the array, if this string is there and based on that print some text.
But my problem is, that if I set up the address
http://mywebsite.com/some-words
to the browser, I’ll got the 404 error.
How can I avoid this error message?
The problem is that you only have a file at
/index.php, you don’t have anything at/some-words. Without any modification to the webserver, it had no way to know that you want a request against/some-wordsto be processed by/index.php. Thus, you get a 404 error since the server can’t find anything at/some-words