- Create a new 404.txt document and copy the following code in:
- Header ("http/1.1 OK");
- $ori _qs = $_server[' query_string ');
- $pattern = '/[^;] +; [^:]+://[^/]+(/[^?] *)(?:? (.*))? /I ';
- Preg_match ($pattern, $ori _qs, $matches);
- $_server[' path_info ' = $matches [1]. ‘?’ . $matches [2];
- $_server[' Request_uri '] = $_server[' path_info '];
- $query _args = Explode (' & ', $matches [2]);
- Unset ($_get);
- foreach ($query _args as $arg)
- {
- $the _arg = explode (' = ', $arg);
- $_get[$the _arg[0]] = $the _arg[1];
- }
- Include (' index.php ');
- ?>
After copying it, click Save As, saving to 404.php.
- Then into the WP backstage, "settings" – "Fixed connection" inside, the first fixed connection select Custom, set to/%post_id%.html.
- Upload the following 404.php page to the Web site root, and then in the virtual host Control Panel to modify the 404 jump page for just uploaded 404.php, so you can implement pseudo-static
address of this article:Https://www.lisen.me/251.html
Copyright Notice:This article for the original article, copyright belongs to Leeson Blog all, welcome to share this article, reproduced please keep the source!
Win host WordPress pseudo static Setup method 404 Page method