1

我使用 apache 代理来获取我的 hexo 博客站点。

ProxyPass /blog http://127.0.0.1:4000/
ProxyPassReverse /blog http://127.0.0.1:4000/

但是 apache 无法正确提供 hexo 静态文件(css、js、图像)。我必须重写静态文件 url,如下所示:

RewriteEngine On
RewriteRule ^/js/(.+)$ /blog/js/$1 [R]
RewriteRule ^/css/(.+)$ /blog/css/$1 [R]
RewriteRule ^/fancybox/(.+)$ /blog/fancybox/$1 [R]

当我改变一个主题时,我必须重写那些重写规则。有没有简单的方法来解决这个问题?

4

0 回答 0