【问题标题】:Load the script from a sub.domain.com on main domain.com [closed]从主 domain.com 上的 sub.domain.com 加载脚本 [关闭]
【发布时间】:2013-01-20 12:32:53
【问题描述】:

有没有办法在我的 domain.com 上加载我在 sub.domain.com 上的脚本? 我需要在不从子域文件夹中移动脚本的情况下以某种方式执行此操作。

有什么方法可以用 htacess 做到这一点?

谢谢

【问题讨论】:

  • 你在说什么“脚本”? PHP、JavaScript、bash..?
  • 带有“脚本”我指的是整个网站。这是一个 Joomla-Virtuemart 网站

标签: .htaccess dns subdomain


【解决方案1】:

要从sub.domain.com/script(位于domain.com 的子文件夹中)加载domain.com/script,您可以使用

Redirect /script /subdomain/script

如果您希望浏览器 URL 保持不变,则必须改用 RewriteRule

RewriteEngine On
RewriteRule script subdomain/script

【讨论】:

  • 感谢您的宝贵时间,它成功了。
猜你喜欢
  • 2016-04-26
  • 1970-01-01
  • 2017-09-02
  • 1970-01-01
  • 1970-01-01
  • 2011-06-22
  • 2021-11-19
  • 2012-05-25
  • 1970-01-01
相关资源
最近更新 更多