我想将网站的所有静态组件(JS,图像,CSS)从“虚拟”文件夹重写到文件系统中更深层的文件夹。
示例:http://example.com/static/image.png
解析为http://example.com/application/templates/some_template/static/image.png
。抱歉是个菜鸟。
提前致谢!
答案 0 :(得分:1)
如果应该重写以/static/
开头的所有内容,您可以使用:
RewriteEngine on
RewriteRule ^static/.+ /application/templates/some_template/$0