`
yunchow
  • 浏览: 318300 次
  • 性别: Icon_minigender_1
  • 来自: 南京
社区版块
存档分类
最新评论

Apache Http Server Rewrite

阅读更多
apache的rewrite功能很强大,详细参考:http://lamp.linux.gov.cn/Apache/ApacheMenu/rewrite/index.html

用法如下步骤:
1,加载Rewrite模块
LoadModule rewrite_module modules/mod_rewrite.so

2,打开引擎
RewriteEngine on

3,编写重写规则与条件
RewriteLogLevel 9
RewriteLog "C:/rewrite.log"

RewriteCond %{DOCUMENT_ROOT}$0 !-f
RewriteRule ^/img/((.+)_(\d+))\.(jpg|png|gif|bmp)$ /img/default/p_$3.jpg


详细重写可参考日志
0
0
分享到:
评论

相关推荐

    Apache HTTP Server Version 2.2 文档(2013.4.10最新)

    Apache HTTP Server Version 2.2 文档 目录: 地址和端口的绑定(Binding) 缓冲指南 配置文件 内容协商 自定义错误响应 动态共享对象(DSO)支持 Apache的环境变量 过滤器(Filter) 词汇表 Apache处理器的使用 Apache ...

    Apache mod_rewrite实现HTTP和HTTPS重定向跳转

    这时候你可以用以下的方式来做到:(Apache mod_rewrite) RewriteEngine On RewriteBase / RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ https://jb51.net/$1 [R=301,L] 把这段代码放在.htaccess文件...

    apache 2 五本合集

    Apache Server 2 Bible.pdf, OReilly Apache The Definitive Guide 3rd Edition.chm, The Apache Modules Book.pdf, The Apache Modules Book Application Development with Apache.pdf, The Apache Modules Book, ...

    url rewrite的例子

    Apache HTTP Server 2.x 和 mod_proxy提供了不错的Rewrite处理方法。so如果使用apache,则直接在apache中配置Rewrite即可。但是对于没有使用代理,或者不完全要在代理服务器配置Rewrite的web应用,通过第三方Jar包...

    Nginx HTTP Server, 3nd Edition

    Configure Nginx to work as frontend for your existing HTTP server Manipulate configuration files with ease and adapt them to various situations Discover the common pitfalls and find out how to avoid ...

    Nginx-HTTP-Server.pdf

    nginx is really fast front end server than apache, now it can support rewrite rules, can work with php.

    txn_box:交易框-Apache Traffic Server的交易工具框插件

    交易框-Apache Traffic Server的交易工具框插件。 有关更多详细信息,请参见。 背景 交易框或“ txn_box”来自多个来源。 主要目标是 提供更好的单一插件来替换各种不一致的插件,例如header_rewrite,regex_remap...

    pLog v1.0 简体中文版

    搜索引擎优化(需要apache server 开rewrite_mod.一般国内的虚拟主机都不好用) 6. XHTML内容. 7. 多语言支持 8. 文件上传(可选择关闭) 9. 强大的插件系统 10. 所见即所得编辑器

    从PHP $_SERVER相关参数判断是否支持Rewrite模块

    如果是//www.jb51.net/p1141.html形式的URL,可通过$_SERVER[‘REQUEST_URI’]和$_SERVER[‘QUERY_STRING’]值的区别来分析,最主要是如果页面是...如果是ISAPI Rewrite环境,虽然不会产生如上$_SERVER[‘REDIRECT_Q

    IIS服务器SSI(rewrite重写)插件的帮助资料

    它兼容Apache的mod_rewrite的语法,从而使仅仅复制.htaccess文件就把配置从appach移植到IIS中或者从IIS移值到appach中变成可能。请参阅3.2兼容性图表这一节。 运行IIS服务器SSI(rewrite重写)插件,可在windows的IIS...

    wampserver5.0

    # Controls who can get stuff from this server. # Order allow,deny Allow from all 5、.php配置 查找short_open_tag = Off,把off改成On,注意是前面没有#号的那一排。 memory_limit = 128M ;最大内存使用,...

    Nginx伪静态配置和常用Rewrite伪静态规则集锦

    nginx里使用伪静态是直接在nginx.conf 中写规则的,并不需要像apache要开启写模块(mod_rewrite)才能进行伪静态。 nginx只需要打开nginx.conf配置文件,在server里面写需要的规则即可。 代码如下:server { listen ...

    onexin_translate.zip

    # IIS/APACHE Web Server 2 Translated by ONEXIN RewriteCond %{QUERY_STRING} ^(.*)$ RewriteRule ^(cn|en|tw|jp|kr|de|fr|es|ru|in|pt|ms|bd|ar|vi|th|is|it|gd|id|nl|se|tr|fi|my|ph)(/.*?)?$ $2?lang=$1&%1 # ...

    Apache服务器二级域名的完美实现

    其次,在 httpd.conf 中打开 mod_rewrite 之后,在 httpd.conf 的最后,添加以下内容: RewriteEngine on RewriteMap lowercase int:tolower RewriteMap vhost txt:/usr/local/etc/apache/vhost.map RewriteCond ${...

    restful restful所需要的jar包

    * AJP server connector available to let you plug behind an Apache HTTP server or Microsoft IIS. It is based on Jetty's connector. * Multiple client HTTP connectors available, based on either the JDK...

    VOS-external接口配置及调试1

    external接口配置及调试V2.1.4.00(含)版本之后增加external接口(json字符串post方式)此接口通过IP认证方式 编辑文件vi /ho

    laravel5环境隐藏index.php后缀(apache)的方法

    在这之前我将laravel目录下的server.php重命名为index.php 链接变成了http://localhost/blog/index.php/xxx/xxx 之前我根据网上的方法操作过,很多都不能用,然后看到一篇搭建laravel环境的文章,有了思路 1、sudo ...

    Practical Mod Perl

    The Apache 1.3 Server Model Section 1.3. The Development of mod_perl 1.0 Section 1.4. Apache 1.3 Request Processing Phases Section 1.5. References Chapter 2. Getting Started ...

    WampServer设置apache伪静态出现404 not found及You don’t have permission to access / on this server解决方法分析 原创

    本文实例讲述了WampServer设置apache伪静态出现404 not found及You don’t have permission to access / on this server解决方法。分享给大家供大家参考。具体如下: 出现404 not found 时: 确保LoadModule rewrite_...

Global site tag (gtag.js) - Google Analytics