Php .htaccess->;重写规则,子域->;停止重定向

Php .htaccess->;重写规则,子域->;停止重定向,php,apache,.htaccess,mod-rewrite,Php,Apache,.htaccess,Mod Rewrite,我想添加到我的网站子域 我有一个这样格式的文件: starwines.com.pl / test.php? page = first starwines.com.pl / test.php? page = second starwines.com.pl / test.php? page = third ... 子域我希望如何拥有: first.starwines.com.pl second.starwines.com.pl third.starwines.com.pl ... .htacce

我想添加到我的网站子域

我有一个这样格式的文件:

starwines.com.pl / test.php? page = first
starwines.com.pl / test.php? page = second
starwines.com.pl / test.php? page = third
...
子域我希望如何拥有:

first.starwines.com.pl
second.starwines.com.pl
third.starwines.com.pl
...
.htaccess-> 我是这样做的:

RewriteCond %{HTTP_HOST} ^first.starwines.com.pl$ [OR]
RewriteCond %{HTTP_HOST} ^www.first.starwines.com.pl$
RewriteRule ^(.*)$ http://starwines.com.pl/test.php?page=first [R=301,L]
这段代码几乎可以工作,但URL会更改为文件
test.php
我希望子域保持不变:
test.starwines.com


请帮助我:(

您认为
R=301
是什么意思?为什么指定
http://starwines.com.pl
?我在web上找到的代码:/I当我删除
R=301
时,问题仍然存在。在您删除
R
后,问题仍然存在,因为您正在使用另一个主机名指定完整url。编程是在您了解您需要什么时进行的o、 不要盲目复制粘贴“在web上找到的东西”Ouu…:)非常感谢您的帮助->
RewriteRule^(.*)$test.php?page=first[L]