无 Cookie 域帮助
我一直在阅读一些有关从单独的域提供图像、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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论