Php .htaccess将url重定向到url友好的子域
我有一个域,我拼命地试图将它上的一个特定URL重定向到另一个作为子域的URL。 子域使用友好的URL方案 我在.htaccess文件中使用了以下内容,但对查询字符串部分无效Php .htaccess将url重定向到url友好的子域,php,apache,.htaccess,mod-rewrite,redirect,Php,Apache,.htaccess,Mod Rewrite,Redirect,我有一个域,我拼命地试图将它上的一个特定URL重定向到另一个作为子域的URL。 子域使用友好的URL方案 我在.htaccess文件中使用了以下内容,但对查询字符串部分无效 RewriteBase / RewriteCond %{HTTP_HOST} ^www.appninjaz.com RewriteRule ^server/data/(.*)$ http://universe.appninjaz.com/data/$1 [L,R=301] 所以基本上,我想做的是: 重定向此URL: 要访问
RewriteBase /
RewriteCond %{HTTP_HOST} ^www.appninjaz.com
RewriteRule ^server/data/(.*)$ http://universe.appninjaz.com/data/$1 [L,R=301]
所以基本上,我想做的是:
重定向此URL:
要访问此子域URL,请执行以下操作:
应用程序id可以是任何数字/id
谢谢,,
亚尼夫试试这个:
RewriteCond %{HTTP_HOST} ^www.appninjaz.com
RewriteCond %{QUERY_STRING} app_id=([0-9]+)
RewriteRule ^server/data/index\.php$ http://universe.appninjaz.com/data/%1? [L,R=301]