[英]How to rewrite .php to .html with mod_rewrite rules
Prolly 一個簡單的.. 我正在嘗試研究 mod_rewrite 並遇到了一個問題
這是我的 url
example.com/index.php?id=1&title=some_title
我希望頁面能夠采取
example.com/1/some_title.html
我該怎么做?
RewriteEngine on
RewriteRule ^(\d+)/(\w+).html$ index.php?id=$1&title=$2
Options +FollowSymLinks
RewriteEngine on
RewriteRule (.*)/(.*)\.html$ index.php?id=$1&title=$2
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.