使用PHP创建动态子域&;xampp本地主机中的htaccess

使用PHP创建动态子域&;xampp本地主机中的htaccess,php,mysql,apache,.htaccess,mod-rewrite,Php,Mysql,Apache,.htaccess,Mod Rewrite,如何在xampp localhost中使用PHP和htaccess创建动态子域 我在mysql中存储了子域名,但我想在Windows平台的xampp localhost中进行如下检查 意味着 我想要这样 在localhost xampp中使用php-mysql 你能一步一步地解释一下吗 如何在localhost xampp窗口中运行它 Advanced thanx您可以尝试以下代码: RewriteEngine On RewriteBase / RewriteCond %{QUERY_STRI

如何在xampp localhost中使用PHP和htaccess创建动态子域 我在mysql中存储了子域名,但我想在Windows平台的xampp localhost中进行如下检查

意味着

我想要这样 在localhost xampp中使用php-mysql 你能一步一步地解释一下吗

如何在localhost xampp窗口中运行它


Advanced thanx

您可以尝试以下代码:

RewriteEngine On
RewriteBase /
RewriteCond %{QUERY_STRING} ^subdomain=([^&]+)$
RewriteRule ^$ http://%1.example.com?  [L,R=301]
这些链接可能会帮助您:


您可以尝试以下代码:

RewriteEngine On
RewriteBase /
RewriteCond %{QUERY_STRING} ^subdomain=([^&]+)$
RewriteRule ^$ http://%1.example.com?  [L,R=301]
这些链接可能会帮助您:


你真的是指
http://example.com/subdomain?=alabaster
或者这是一个打字错误,你的意思是
http://example.com/?subdomain=alabaster
?你真的是指
http://example.com/subdomain?=alabaster
或者这是一个打字错误,你的意思是
http://example.com/?subdomain=alabaster