请求 .htaccess 重写规则
I have two websites(a.com and b.com)
When I hit these type of file
js|css|gif|jpg|png|ico|txt|swf|mp3|pdf|ps|wav|mid|midi|flv|zip|rar|gz|tar|bmp
E.G. http://a.com/123/b.jpg -> http://b.com/123/b.jpg
http://a.com/256/c.jpg -> http://b.com/256/c.jpg
How can I do it?
Thanks
I have two websites(a.com and b.com)
When I hit these type of file
js|css|gif|jpg|png|ico|txt|swf|mp3|pdf|ps|wav|mid|midi|flv|zip|rar|gz|tar|bmp
E.G. http://a.com/123/b.jpg -> http://b.com/123/b.jpg
http://a.com/256/c.jpg -> http://b.com/256/c.jpg
How can I do it?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在a.com主机的DocumentRoot目录下的.htaccess文件中放置以下规则:
In the .htaccess file in DocumentRoot directory of a.com host put this rule:
将此规则添加到您的 .htaccess 中:
Add this rule into your .htaccess: