Php 显示文件夹中子域的内容
我该如何做这样的事情:(可能是使用.htaccess?或其他什么,需要最快的方法) 子域:Php 显示文件夹中子域的内容,php,apache,.htaccess,subdomain,Php,Apache,.htaccess,Subdomain,我该如何做这样的事情:(可能是使用.htaccess?或其他什么,需要最快的方法) 子域: subdomain.example.com 显示以下内容: https://example.com/folder/index.php?name=subdomain 最快的方法是什么 另外,我是否需要在ubuntu、apache或dns中设置任何内容?为apache配置添加VirtualHost条目: <VirtualHost *:80> ServerName subdomain.e
subdomain.example.com
显示以下内容:
https://example.com/folder/index.php?name=subdomain
最快的方法是什么
另外,我是否需要在ubuntu、apache或dns中设置任何内容?为apache配置添加VirtualHost条目:
<VirtualHost *:80>
ServerName subdomain.example.com
ServerAlias example.com
DocumentRoot /folder/index.php
</VirtualHost>
ServerName subdomain.example.com
ServerAlias example.com
DocumentRoot/folder/index.php
更改文档根目录以匹配服务器路径