.htaccess Htaccess:在第二个域上以简化的url结构显示相同的页面

.htaccess Htaccess:在第二个域上以简化的url结构显示相同的页面,.htaccess,mirroring,multiple-domains,.htaccess,Mirroring,Multiple Domains,这应该很容易,但事实并非如此 我想做到这一点: http://finaldomain.com/PAGENAME是我想要的url 使用 http://subdomain.generaldomain.com/index.php?/static parameter/PAGENAME是服务器呈现页面所需的内容 我正在寻找一个带有htaccess的镜像。不是重定向。 这能做到吗 提前感谢,, Diederik在文档根目录中尝试此.htaccess RewriteEngine on RewriteBas

这应该很容易,但事实并非如此

我想做到这一点:

  • http://finaldomain.com/PAGENAME是我想要的url 使用
  • http://subdomain.generaldomain.com/index.php?/static parameter/PAGENAME是服务器呈现页面所需的内容
我正在寻找一个带有htaccess的镜像。不是重定向。 这能做到吗

提前感谢,,
Diederik

在文档根目录中尝试此
.htaccess

RewriteEngine on
RewriteBase /

RewriteCond %{HTTP_HOST} ^(www\.)?finaldomain\.com$ [NC]
RewriteRule ^(.*)$ http://subdomain.generaldomain.com/index.php?/static-parameter/$1 [L]
这将改变方向

http://www.finaldomain.com/file.php => to =>
http://subdomain.generaldomain.com/index.php?/static-parameter/file.php

http://finaldomain.com/subfolder/file.php => to =>
http://subdomain.generaldomain.com/index.php?/static-parameter/subfolder/file.php