Apache下伪静态html(URL Rewrite)的设置方法
来源:互联网 发布:clan 软件 编辑:程序博客网 时间:2024/05/29 04:47
一 打开 Apache 的配置文件 httpd.conf 。
二 将#LoadModule rewrite_module modules/mod_rewrite前面的#去掉
三 在 httpd.conf中添加:
<IfModule mod_rewrite.c>
RewriteEngine On
#RewriteCond %{ENV:SCRIPT_URL} (?:index|dispbbs)[-0-9]+\.html
RewriteRule ^(.*?(?:index|dispbbs))-([-0-9]+)\.html$ {GetProperty(Content)}.php?__is_apache_rewrite=1&__rewrite_arg=$2
</IfModule>
四 要实现asp帖子URL到php帖子的映射,在 第三步的<IfModule mod_rewrite.c>和</IfModule>之间添加:
RewriteMap tolowercase int:tolower
RewriteCond %{QUERY_STRING} (?:boardid|page|id|replyid|star|skin)\=\d+ [NC]
RewriteRule ^(.*(?:index|dispbbs))\.asp$ {GetProperty(Content)}.php?${tolowercase:%{QUERY_STRING}}&__is_apache_rewrite=1
五 保存httpd.conf并重启Apache
- Apache下伪静态html(URL Rewrite)的设置方法
- IIS下伪静态html(URL Rewrite)的设置方法
- Apache和Nginx设置伪静态(URL Rewrite)的方法
- Apache伪静态html(URL Rewrite)设置法
- IIS 配置伪静态页html URL Rewrite 的设置方法
- destoon URL Rewrite(伪静态)设置方法
- destoon的URL Rewrite(伪静态)设置方法【完整步骤】
- Rewrite – Apache转Lighttpd的伪静态rewrite方法
- 利用Apache的rewrite实现URL的伪静态化
- Apache URL Rewrite配置(php 伪静态)
- Apache Url Rewrite 配置(php伪静态)
- php 伪静态(url rewrite)apache配置!
- php 伪静态(url rewrite)apache配置!
- php 伪静态(url rewrite)apache配置!
- URL rewrite,Apache 伪静态规则配置
- Lighttpd下WORDPRESS的URL Rewrite伪静态规则
- centos下Apache服务器ThinkPHP伪静态的设置方法
- [伪静态]基于Apache URL Rewrite的静态化网页(.htaccess)
- Rewrite妙用
- 启用mod_rewrite模块
- STM32 printf 函数重定向
- 程序员的常见健康问题
- 为程序员量身定制的12个目标
- Apache下伪静态html(URL Rewrite)的设置方法
- STM32 printf重定向
- Always Changing
- ACM中使用JAVA v2.1
- 纠正电脑、手机等错误的充电方式—锂电池的充电方式
- Programming Windows Azure Note
- PHP句法规则详解
- USACO Section 5.2 Electric Fences - 有意思的枚举+计算几何
- POJ1975 Median Weight Bead [Floyd]