无 Cookie 域帮助

发布于 2024-10-08 01:38:49 字数 742 浏览 0 评论 0原文

我一直在阅读一些有关从单独的域提供图像、javascript 和 css 的内容。

我在我的服务器上设置了一个域,不是子域,而是一个新帐户。

例如,我的网站是:http://www.site.com

我已经为 http://s1.site.com 设置了一个新帐户

简而言之,我有大约 40GB 的图像,所以我移动它(还需要我更新一些脚本,因为我有抓取图像的刮刀)我想知道是否有一种方法将我的新子域指向我的其他内容?

基本上,我想在 s1.site.com 上创建一个 .htaccess 文件,并让它从 www.site.com 中提取信息,例如:

http://www.site.com/images/picture.jpg

变成

http://s1.site.com/images/picture.jpg

但该图像并不真正存在于 s1.site 上.com,我们只是使用 htaccess 对其进行“镜像”,以节省将所有内容复制到静态域的麻烦。

请让我知道这是如何实现的,因为这会节省我大量的时间并且会创造奇迹。

我基本上只是想在

http://s1.site.com/* 上从 /home/originalsite/public_html/(images/js/css 文件夹) 中提取任何内容

I've been reading a bit about serving my images, javascript and css from a seperate domain.

I have set up a domain, not a sub domain but a new account on my server.

My site is for example: http://www.site.com

I have set up a new account for http://s1.site.com

To cut it short, I have about 40gb of images, so rather me moving it (would also require me to update a few of my scripts as I have scrapers to grab images) I was wondering if there was a way to point my new sub-domain to my other content?

Basically, I want to create a .htaccess file on s1.site.com and get it to pull the info from www.site.com, for example:

http://www.site.com/images/picture.jpg

becomes

http://s1.site.com/images/picture.jpg

But the image doesn't really exist on the s1.site.com, we are just 'mirroring' it using htaccess to save the hassle of copying everything over to the static domain.

Please let me know how this is possible, as it would save me a great deal of time and would work wonders.

I basically just want to make anything on

http://s1.site.com/* pull from /home/originalsite/public_html/(images/js/css folders)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文