Php 为特定页面创建子域
我知道如何使用通配符在cpanel中创建子域,但当用户打开page.php时,子域就会像这样创建Php 为特定页面创建子域,php,.htaccess,subdomain,wildcard-subdomain,Php,.htaccess,Subdomain,Wildcard Subdomain,我知道如何使用通配符在cpanel中创建子域,但当用户打开page.php时,子域就会像这样创建 page.website.com 这是可以做到的。htaccess还是其他方法 谢谢。with.htaccess RewriteCond %{HTTP_HOST} !^www.[NC] RewriteCond %{HTTP_HOST} ^(.+?)page\.website\.com$ [NC] RewriteRule ^$ page.php%1 [L,QSA] DirectoryIndex p
page.website.com
这是可以做到的。htaccess还是其他方法
谢谢。with.htaccess
RewriteCond %{HTTP_HOST} !^www.[NC]
RewriteCond %{HTTP_HOST} ^(.+?)page\.website\.com$ [NC]
RewriteRule ^$ page.php%1 [L,QSA]
DirectoryIndex page.php index.html index.php
出于后备原因,在page.php之后添加index.html和index.php
使用
.htaccess
RewriteCond %{HTTP_HOST} !^www.[NC]
RewriteCond %{HTTP_HOST} ^(.+?)page\.website\.com$ [NC]
RewriteRule ^$ page.php%1 [L,QSA]
您可以使用cpanel创建子域
你是说当有人打开www.page.website.com链接时,page.php就会打开?@Adas我才意识到你编辑了你的问题。请用我编辑的答案再次核对。