How to Install Hyper-V on Windows 10 / 11 Home
Hyper-V comes with all versions of Windows 10/11. except Home. However, don't fret; there are ways to enable Hyper-V on Windows 10 / 11 Home.
We wanted to create the absolute most basic routing code in PHP, so here it is. We will direct ALL traffic to index and route to the new files from here.
In the root of your project, create a .htaccess
file that will redirect all requests to index.php
.
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.+)$ index.php [QSA,L]
Get the requested path with $_SERVER['REQUEST_URI']
, and require the page you want to display. I have ''
and '/'
for both url.com/ and url.com.
<?php
$request = $_SERVER['REQUEST_URI'];
switch ($request) {
case '/' :
require __DIR__ . '/home.php';
break;
case '' :
require __DIR__ . '/home.php';
break;
case '/about' :
require __DIR__ . '/views/about.php';
break;
default:
http_response_code(404);
require __DIR__ . '/error.php';
break;
}
Create a /views
directory and place the files.
<h1>Main</h1>
<h1>About</h1>
<h1>404</h1>
That's it!
Hyper-V comes with all versions of Windows 10/11. except Home. However, don't fret; there are ways to enable Hyper-V on Windows 10 / 11 Home.
How to fix a Hacked cPanel account, a user account
One of the most commonly known SEO practices is breaking up your web page content with headings. Ranging from h1 as the biggest, highest importance through to