當前位置:
首頁 >
.htaccess伪静态实例记录
發布時間:2025/3/21
26
豆豆
生活随笔
收集整理的這篇文章主要介紹了
.htaccess伪静态实例记录
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
2019獨角獸企業重金招聘Python工程師標準>>>
原始 php.muyangcheng.com/tag/index" data-ke-src=">php</a>.muyangcheng.com/tag/index">index.php 偽靜態 index.html
RewriteRule ^index\.html$ index.php
原始 news/detail.php?id=2 ?偽靜態 ?news/detail_2.html
RewriteRule ^news/detail_([0-9]{1,})\.html$ news/detail.php?id=$1
原始 index.php?cid=2&id=3 ?偽靜態 2-3.html
RewriteRule?([a-zA-Z]{1,})-([0-9]{1,})\.html$?index.php?cid=$1&id=$2
([a-zA-Z]{1,})-([0-9]{1,})\.html$是規則,index.php?action=$1&id=$2是要替換的格式,$1代表第一個括號匹配的值,$2代表第二個,如此類推!!
轉載于:https://my.oschina.net/leadsir/blog/137726
總結
以上是生活随笔為你收集整理的.htaccess伪静态实例记录的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: heartbeat+drbd+mysql
- 下一篇: 使用maven编译YCSB0.1.4对c