如何将GET参数显示为新目录?

I am currently working on a website where pupils can create articles that can be commented by others.

I have a already developed a script that creates them and stores them in a mysql db.

Every one of these articles should be available under www.mydomain/articles/xyz/

but I don't want to create a new directory for everyone. So is it possible to pass the parameter article=xyz (www.maydomain/articles/articles.php&articles=xyz) to be shown as before mentioned?

I am sorry if my problem is too complex. If you have a question regarding it, do not hesitate to contact me! :)

Maybe you can do something like this with .htaccess file.
You can redirect every page to your index.phppage

<IfModule mod_rewrite.c>
    RewriteEngine On
    DirectoryIndex index.php
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-l
    RewriteRule . /index.php [L]
</IfModule>

And then you can handle your domain in your php file:

<?php

/*
Example URL
$url = www.maydomain/articles/querystring/articles/xyz/param2/value2/param3/value3
$url = $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
*/

$url = "www.maydomain/articles/querystring/articles/xyz/param2/value2/param3/value3";
$url = explode("/querystring/", $url);

/*
Where $url[0] is (www.maydomain/articles),
and $url[1] is the rest of it (queryqtring/articles/xyz/param2/value2/param3/value3)
*/

// If you need you can include your page articles on your index page like this
$page_name = explode("/", $url[0]);
$page_name = end($page_name);
include("/path to your directory/". $page_name .".php");

$query_string = $url[1];
// And one more explode for query string:
$query_params = explode("/", $query_string);


for($i=0; $i<count($query_params); $i++)
{
    // odd value is GET name
    $key = $query_params[$i];
    // even value is GET value
    $value = (isset($query_params[$i+1])) ? $query_params[$i+1] : "";
    $_GET[$key] = $value;
    $i++;
}

echo "<pre>";
print_r($_GET);
echo "</pre>";

/*
// GET Output
Array
(
    [articles] => xyz
    [param2] => value2
    [param3] => value3
)
*/

?>

it can be achieved using htaccess,See this Tutorial for htaccess, this will guide you

https://codex.wordpress.org/htaccess

https://www.sitepoint.com/htaccess-for-all/