开发者

How can Apache serve assets (css, images, scripts) from a different document root?

开发者 https://www.devze.com 2023-01-05 20:05 出处:网络
Is there a way to do this? I\'d like for my assets to be served from a different document root, and I\'m not sure i开发者_运维技巧f Apache has directives for that.To serve whole directories from a dif

Is there a way to do this? I'd like for my assets to be served from a different document root, and I'm not sure i开发者_运维技巧f Apache has directives for that.


To serve whole directories from a different location, there's Alias:

Alias /assets /path/to/assetsdir

works in httpd.conf only, though, if you want to point outside the web root.

For specific files there is AliasMatch.

0

精彩评论

暂无评论...
验证码 换一张
取 消