To obtain a pseudo static rewrite rule to achieve the function is as follows: a virtual space, three domain names want to create three sites such as http://a.comhttp: // B. comhttp: // c.com to achieve: Access: http://a.com is actually access to the virtual space root directory in: index.htm access: http:// B .com is actually seeking a pseudo static override rule
The following functions are available:
One virtual space, three domain names want to build three websites
For example
Http://a.com
Http:// B .com
Http://c.com
To achieve this:
Access: The http://a.com is actually accessing: index.htm in the virtual space root directory
Access: The http:// B .com is actually accessing the: index.htm under the virtual space root directory under the B folder
Access: The http://c.com is actually accessing the: index.htm under the c folder under the virtual space root directory
------ Solution --------------------
I just saw your message.
I don't know much about pseudo-static writing, but you can.
Directly include.
PHP code
function curPageURL(){ $pageURL = 'http'; if (isset($_SERVER["HTTPS"])&&($_SERVER["HTTPS"] == "on")) { $pageURL .= "s"; } $pageURL .= "://"; if ($_SERVER["SERVER_PORT"] != "80") { $pageURL .= $_SERVER["SERVER_NAME"] . ":" . $_SERVER["SERVER_PORT"] . $_SERVER["REQUEST_URI"]; } else { $pageURL .= $_SERVER["SERVER_NAME"] . $_SERVER["REQUEST_URI"]; } return $pageURL;}$url=curPageURL();switch ($url){ case 'http://a.com': include 'index.htm'; break; case 'http://b.com': include './b/index.htm'; break; default: include 'index.htm'; break;}