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

位置:首页>文章>详情   分类: 教程分享 > Java教程   阅读(731)   2023-03-28 11:29:14

配置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>
标签: Apache301 301 apache
地址:https://www.leftso.com/article/515.html

相关阅读

apache 24 配置301跳转 解决cdn问题
前言       在写作前,作者也百度查了很多Spring boot 301重定向资料
typecho 301伪静态配置
Java spring mvc项目,Spring MVC中怎么实现301跳转
Apache Shiro教程,您的第一个Apache Shiro应用程序(翻译)-编程技术
Java 10上的Apache CXF
java编程中采用Apache common.httpclient方式模拟POST请求
Spring Boot 2.0 支持的Apache Camel 版本发布了_Apache Camel 2.22发布支持Spring Boot 2.0
Apache配置worker模式_Apache配置worker模式调优
HttpClient 4 按照POST重定向请求,本快速教程将展示如何配置Apache HttpClient 4以自动遵循POST请求的重定向。