apache 24 配置31跳转 解决cdn问题

apache 24 配置301跳转 解决cdn问题

配置http.conf配置文件

解锁以下模块

LoadModule rewrite_module modules/mod_rewrite.so

添加以下配置

<IfModule rewrite_module>
Options +FollowSymLinks
RewriteEngine on
RewriteCond Host: ^localhost$
#RedirectMatch 301 /static/(.*) http\://cdn\.test\.com/static/$1
RedirectMatch 301 /static/img/(.*) http\://cdn\.test\.com/static/img/$1
RedirectMatch 301 /static/echarts\.min\.js http\://cdn\.test\.com/static/echarts\.min\.js
RedirectMatch 301 /static/public-framework\.js http\://cdn\.test\.com/static/public-framework\.js
</IfModule>
apache 24 配置31跳转 解决cdn问题

相关文章:

你感兴趣的文章:

标签云: