iT邦幫忙

0

將每筆資料存成html

想請問向591這種每筆資料都是
https://rent.591.com.tw/?kind=0&region=4
https://rent.591.com.tw/rent-detail-8070894.html
是客戶上傳資料後,他自動產生一個rent-detail-8070894.html檔案嗎?
有沒有相關的參考範例或作法呢?

咖咖拉 iT邦好手 1 級 ‧ 2019-08-13 14:40:17 檢舉
這種架構 可能是寫成 偽靜態
也可能 PHP 產生HTML
圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

2 個回答

2
echochio
iT邦高手 1 級 ‧ 2019-08-13 15:53:23

用 .htaccess 寫RewriteEngine 就可以了

www.xxx.com/index.php?id=1

變成

www.xxx.com/index-1.html

.htaccess 內容是

RewriteEngine On
#RewriteBase /
RewriteRule ^index-(\d+)\.html$ index.php?id=$1

分析一下網頁看到內容是
https://ithelp.ithome.com.tw/upload/images/20190813/20110611izc8Pk3aPB.png

0
混水摸魚
iT邦研究生 2 級 ‧ 2019-08-14 08:47:22

這個給你參考參考:https://www.webteach.tw/?p=199

我要發表回答

立即登入回答