#
#以下是网站伪静态正则
#
RewriteEngine On
RewriteRule ^index.html$ index.php
RewriteRule ^about.html$ about.php
RewriteRule ^about_([0-9]+).html$ about.php?id=$1
RewriteRule ^contact.html$ contact.php
RewriteRule ^service.html$ service.php
RewriteRule ^case.html$ case.php
RewriteRule ^case_([0-9]+).html$ case.php?fid=$1
RewriteRule ^case_show_([0-9]+).html$ case_show.php?id=$1
RewriteRule ^wenda.html$ wenda.php
RewriteRule ^wenda_show_([0-9]+).html$ wenda_show.php?id=$1
RewriteRule ^interact.html$ interact.php
RewriteRule ^interact_show_([0-9]+).html$ interact_show.php?id=$1
RewriteRule ^news.html$ news.php
RewriteRule ^news_([0-9]+).html$ news.php?fid=$1
RewriteRule ^news_show_([0-9]+).html$ news_show.php?id=$1
RewriteRule ^news_page([[0-9]+).html$ news.php?page=$1
RewriteRule ^news_fid([[0-9]+)_page([[0-9]+).html$ news.php?fid=$1&page=$2
RewriteRule ^wenti_([0-9]+).html$ wenti.php?fid=$1
RewriteRule ^wenti_show_([0-9]+).html$ wenti_show.php?id=$1
RewriteRule ^wenti_fid([[0-9]+)_page([[0-9]+).html$ wenti.php?fid=$1&page=$2
RewriteRule ^zhuanjia_([0-9]+).html$ zhuanjia.php?fid=$1
RewriteRule ^zhuanjia_show_([0-9]+).html$ zhuanjia_show.php?id=$1
RewriteRule ^product.html$ product.php
RewriteRule ^product_([0-9]+).html$ product.php?fid=$1
RewriteRule ^product_show_([0-9]+).html$ product_show.php?id=$1
RewriteRule ^product_page([[0-9]+).html$ product.php?page=$1
RewriteRule ^service_page([[0-9]+).html$ service.php?page=$1
RewriteRule ^interact_page([[0-9]+).html$ interact.php?page=$1
RewriteRule ^wenda_page([[0-9]+).html$ wenda.php?page=$1
RewriteRule ^zhuanjia_fid([[0-9]+)_page([[0-9]+).html$ zhuanjia.php?fid=$1&page=$2
RewriteRule ^save_action_([a-z]+).html$ save.php?action=$1

php .htaccess 伪静态的更多相关文章

  1. .htaccess伪静态(URL重写)绑定域名到子目录实现子站点

    Apache主机一般支持.htaccess伪静态,即可以实现绑定域名到子目录.一个空间多个站点. 应用举例:绑定htaccess.800m.net到htaccess目录 根目录下.htaccess内容 ...

  2. nginx上支持.htaccess伪静态的配置实例

    本文介绍下,在nginx上配置.htaccess伪静态的方法,有需要的朋友参考下吧. 在apache上.htaccess转向,只要apache编译的时候指明支持rewrite模块即可. 但是换到ngi ...

  3. apache上.htaccess转向nginx上配置.htaccess伪静态规则

    nginx上配置.htaccess伪静态规则 在apache上.htaccess转向,只要apache编译的时候指明支持rewrite模块即可. 但是换到nginx上方法会有不同,有人说把.htacc ...

  4. Linux启动Apache支持.htaccess伪静态文件方法

    第一.编辑httpd.conf文件 A - 在etc/httpd/conf/目录下的httpd.conf 文件,找到: LoadModule rewrite_module modules/mod_re ...

  5. nginx上如何支持.htaccess伪静态转向

    我们知道在apache上有一个常用的功能.htaccess转向,只要apache编译的时候指明支持rewrite模块就可以了. 但是换到nginx上方法会有一点不一样,网上很多人说把.htaccess ...

  6. linux网站配置文件.htaccess伪静态转换到IIS web.config中

    linux下的php网站放到Windows服务器IIS下.htaccess文件伪静态规则转换.   此办法只适合于linux下的php网站放到Windows服务器IIS下,网站除了主页面正常以外子页面 ...

  7. 如何在windows下Apache环境开启htaccess伪静态功能

     以下文章来自于网络,只做学习用 很多国人习惯用windows服务器或者在windows系统下调试PHP程序,在调试货使用的时候就遇到开启伪静态的各种问题,今天在网络上搜集了一些开启伪静态需要注意 ...

  8. htaccess 伪静态的规则

    利用htaccess文件可以很好的进行站点伪静态,并且形成的目标地址与真正的静态页面几乎一模一样,如abc.html等,伪静态可以非常好的结合SEO来提高站点的排名,并且也能给人一种稳定的印象. 由于 ...

  9. Apache环境.htaccess伪静态301跳转(www与不带www)

    一般而言,我们使用的301跳转就是WWW与不带WWW域名之间的跳转,用行话说就是权重要归一.对于我们使用Apache环境的来说其实相对nginx比较简单,因为只需要我们在网站根目录有.htaccess ...

  10. apache .htaccess 伪静态重定向,防盗链 限制下载...

    301全站跳转 RewriteEngine OnRewriteCond %{HTTP_HOST} ^www\.old\.net$ [NC]RewriteRule ^(.*)$ http://www.n ...

随机推荐

  1. 智能聊天机器人——基于RASA搭建

    前言: 最近了解了一下Rasa,阅读了一下官方文档,初步搭建了一个聊天机器人. 官方文档:https://rasa.com/docs/ 搭建的chatbot项目地址: https://github.c ...

  2. Kafka认证权限配置(动态添加用户)

    之前写过一篇Kafka ACL使用实战,里面演示了如何配置SASL PLAINTEXT + ACL来为Kafka集群提供认证/权限安全保障,但有一个问题经常被问到:这种方案下是否支持动态增加/移除认证 ...

  3. JavaScript Practices

    不定时更新:https://github.com/zhengyeye/JS-practices Day1:关于创建对象的几种方式: Day3:原型 早前一篇:https://www.cnblogs.c ...

  4. CocoaPods 添加WebP失败解决办法

    pod 'sdwebimage/webp' 下载libwebp 超时 [!] Error installing libwebp [!] /usr/bin/git clone https://chrom ...

  5. 排序算法--希尔排序(Shell Sort)_C#程序实现

    排序算法--希尔排序(Shell Sort)_C#程序实现 排序(Sort)是计算机程序设计中的一种重要操作,也是日常生活中经常遇到的问题.例如,字典中的单词是以字母的顺序排列,否则,使用起来非常困难 ...

  6. react better-scroll 编写类似手机chrome的header显示隐藏效果

    关键代码 const H = 50; // header的高度 const H2 = H / 2; let cy = 0; class Home extends Component { @observ ...

  7. hibernate06--参数的绑定

    创建Dept实体类 以及 对应的 Dept.hbm.xml文件 /** * @author 小豆腐 * *部门的实体类 */ public class Dept { private Integer d ...

  8. 将 Entity Framework、LINQ 和 Model-First 用于 Oracle 数据库

    目的 本教程介绍如何使用 Entity Framework.语言集成查询 (LINQ),以及如何对 Oracle 数据库使用 Model-First 以生成数据定义语言 (DDL) 脚本. 所需时间 ...

  9. git push fatal: The remote end hung up unexpectedly

    git push fatal: The remote end hung up unexpectedly git config http.postBuffer git gc --aggressive 不 ...

  10. 防止xss和sql注入:JS特殊字符过滤正则

    function stripscript(s) { var pattern = new RegExp("[%--`~!@#$^&*()=|{}':;',\\[\\].<> ...