Apache伪静态html(URL Rewrite)设置法
2009-04-20 19:06
351 查看
一 打开 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$ $1.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$ $1.php?${tolowercase:%{QUERY_STRING}}&__is_apache_rewrite=1五 保存httpd.conf并重启Apache。
二 将#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$ $1.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$ $1.php?${tolowercase:%{QUERY_STRING}}&__is_apache_rewrite=1五 保存httpd.conf并重启Apache。
相关文章推荐
- Apache伪静态html(URL Rewrite)设置法
- Apache伪静态html(URL Rewrite)设置法
- Apache下伪静态html(URL Rewrite)的设置方法
- apache rewrite thinkphp重写伪静态,加.html后缀
- php 伪静态(url rewrite)apache配置!
- apache伪静态设置
- [伪静态]基于Apache URL Rewrite的静态化网页(.htaccess)
- 为了实现伪静态 php、mysql、apache都需要做那些设置
- IIS7.0设置 url重写成html(伪静态)
- PHP伪静态Rewrite设置之APACHE篇
- PHP伪静态Rewrite设置之APACHE篇
- IIS下下伪静态html(URL Rewrite)设置方法
- Apache:设置首页运行index.html index.php的顺序
- Linux下面怎样可以把Apache网站根目录:/var/www/html/ 设置成Vsftp默认目录?
- Linux下Apache伪静态设置
- apache配置优化之伪静态设置
- php 伪静态(url rewrite)apache配置!
- IIS 配置伪静态页html URL Rewrite 的设置方法
- URL伪静态设置 (apache2.4)
- php 伪静态(url rewrite)apache配置!