将url重定向到单独的主机,同时保留文件结构


redirect url to separate hosting while retaining file structure

我拥有theone.com和twosies.com。我把我的主机和twosies捆绑在一起。

我有我的网站位于twosies.com/theone/

和到达twosies.com/theone/home.php

我想通过theone.com/home.php进入网站

我该怎么做?我以前使用过htaccess,但只是为了简化页面查询和删除文件扩展名。

泰勒

*修复了一个错误

您不需要mod_rewritephp,一个简单的重定向可以做到这一点:

Redirect /service http://foo2.example.com/service

点击链接查看详情

<?php
function Redirect($path){
          ?>
          <script language="javascript" type="text/javascript">
                window.location = "<?php echo $path; ?>";
          </script>
          <?php
          }
?>