如何在Apache環境下配置Rewrite規則

原文鏈接:http://faq.comsenz.com/viewnews-12

URL 靜態化是一個利于搜索引擎的設置,通過 URL 靜態化,達到原來是動態的 PHP 頁面轉換為靜態化的 HTML 頁面,當然,這里的靜態化是一種假靜態,目的只是提高搜索引擎的搜索量,Comsenz 旗下的產品 Discuz!、SupeSite/X-Space、ECShop、SupeV、UCHome 等都支持此功能。當然這個功能還需要服務器環境的支持,下面介紹一下如何在 Apache 服務器下配置 URL 靜態化的 Rewrite 規則。

當然這里分兩種情況,一種是獨立主機用戶,這部分用戶擁有對主機的管理權限,因此配置起來比較方便一些。(注:這里就以 Discuz!6.1.0 的 Rewrite 規則為例,稍后在后面會列舉出其他產品的 Rewrite 規則。

首先確定您使用的 Apache 版本,及是否加載了 mod_Rewrite 模塊。

Apache 1.x 的用戶請檢查 conf/httpd.conf 中是否存在如下兩段代碼:
LoadModule Rewrite_module libexec/mod_Rewrite.so
AddModule mod_Rewrite.c 

Apache 2.x 的用戶請檢查 conf/httpd.conf 中是否存在如下一段代碼:

LoadModule Rewrite_module modules/mod_Rewrite.so

如果存在,那么在配置文件(通常就是 conf/httpd.conf)中加入如下代碼。此時請務必注意,如果網站使用通過虛擬主機來定義,請務必加到虛擬主機配置,即 <VirtualHost> 中去,如果加在虛擬主機配置外部將可能無法使用,改好后將 Apache 重啟。

<IfModule mod_Rewrite.c>
RewriteEngine On
RewriteRule ^(.*)/archiver/((fid|tid)-[\w\-]+\.html)$ $1/archiver/index.php?$2
RewriteRule ^(.*)/forum-([0-9]+)-([0-9]+)\.html$ $1/forumdisplay.php?fid=$2&page=$3
RewriteRule ^(.*)/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$ $1/viewthread.php?tid=$2&extra=page\%3D$4&page=$3
RewriteRule ^(.*)/space-(username|uid)-(.+)\.html$ $1/space.php?$2=$3
RewriteRule ^(.*)/tag-(.+)\.html$ $1/tag.php?name=$2
</IfModule>

如果沒有安裝 mod_Rewrite,您可以重新編譯 Apache,并在原有 configure 的內容中加入 --enable-Rewrite=shared,然后再在 Apache 配置文件中加入上述代碼即可。

另外一種用戶是 Apache 虛擬主機用戶。

在開始以下設置之前,請首先咨詢您的空間服務商,空間是否支持 Rewrite 以及是否支持對站點目錄中 .htaccess 的文件解析,否則即便按照下面的方法設置好了,也無法使用。

檢查論壇所在目錄中是否存在 .htaccess 文件,如果不存在,請手工建立此文件。Win32 系統下,無法直接建立 .htaccess 文件,您可以從其他系統中拷貝一份,或者在 Discuz.net 技術支持欄目中下載此文件。編輯并修改 .htaccess 文件,添加以下內容:
# 將 RewriteEngine 模式打開
RewriteEngine On
# 修改以下語句中的 /discuz 為你的論壇目錄地址,如果程序放在根目錄中,請將 /discuz 修改為 /
RewriteBase /discuz
# Rewrite 系統規則請勿修改
RewriteRule ^archiver/((fid|tid)-[\w\-]+\.html)$ archiver/index.php?$1
RewriteRule ^forum-([0-9]+)-([0-9]+)\.html$ forumdisplay.php?fid=$1&page=$2
RewriteRule ^thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$ viewthread.php?tid=$1&extra=page\%3D$3&page=$2
RewriteRule ^space-(username|uid)-(.+)\.html$ space.php?$1=$2
RewriteRule ^tag-(.+)\.html$ tag.php?name=$1

添加內容時,請遵照上面的提示,修改論壇所在的路徑,然后保存。將 .htaccess 文件上傳到論壇所在的目錄中。然后進入論壇系統設置的搜索引擎優化,根據需要開啟 URL 靜態化功能。

下面簡單介紹一些其他產品的 Rewrite 規則。

SupeSite/X-Space6.0 UC規則

Apache 獨立主機用戶:

<IfModule mod_Rewrite.c>
RewriteEngine On
###Rewrite 系統規則請勿修改
RewriteRule ^/([0-9]+)/spacelist(.+)$ /index.php?uid/$1/action/spacelist/type$2 [L]
RewriteRule ^/([0-9]+)/viewspace(.+)$ /index.php?uid/$1/action/viewspace/itemid$2 [L]
RewriteRule ^/([0-9]+)/viewbbs(.+)$ /index.php?uid/$1/action/viewbbs/tid$2 [L]
RewriteRule ^/([0-9]+)/(.*)$ /index.php?uid/$1/$2 [L]
RewriteRule ^/([0-9]+)$ /index.php?uid/$1 [L]
RewriteRule ^/action(.+)$ /index.php?action$1 [L]
RewriteRule ^/category(.+)$ /index.php?action/category/catid$1 [L]
RewriteRule ^/viewnews(.+)$ /index.php?action/viewnews/itemid$1 [L]
RewriteRule ^/viewthread(.+)$ /index.php?action/viewthread/tid$1 [L]
RewriteRule ^/mygroup(.+)$ /index.php?action/mygroup/gid$1 [L]
</IfModule>

Apache 虛擬主機用戶:

### 將 RewriteEngine 模式打開
RewriteEngine On
### 修改以下語句中的 /SupeSite 修改為你的SupeSite目錄地址,如果程序放在根目錄中,請將 /SupeSite 修改為 /
RewriteBase /
### Rewrite 系統規則請勿修改
RewriteRule ^([0-9]+)/spacelist(.+)$ index.php?uid/$1/action/spacelist/type$2 [L]
RewriteRule ^([0-9]+)/viewspace(.+)$ index.php?uid/$1/action/viewspace/itemid$2 [L]
RewriteRule ^([0-9]+)/viewbbs(.+)$ index.php?uid/$1/action/viewbbs/tid$2 [L]
RewriteRule ^([0-9]+)/(.*)$ index.php?uid/$1/$2 [L]
RewriteRule ^([0-9]+)$ index.php?uid/$1 [L]
RewriteRule ^action(.+)$ index.php?action$1 [L]
RewriteRule ^category(.+)$ index.php?action/category/catid$1 [L]
RewriteRule ^viewnews(.+)$ index.php?action/viewnews/itemid$1 [L]
RewriteRule ^viewthread(.+)$ index.php?action/viewthread/tid$1 [L]
RewriteRule ^mygroup(.+)$ index.php?action/mygroup/gid$1 [L]

ECShop2.6.0 規則

Apache 獨立主機用戶:

<IfModule mod_Rewrite.c>
RewriteEngine On
RewriteRule ^(.*)/index.html$ $1/index.php 
RewriteRule ^(.*)/category$ $1/index.php [L]
RewriteRule ^(.*)/feed-c([0-9]+).xml$ $1/feed.php?cat=$2 [L]
RewriteRule ^(.*)/feed-b([0-9]+).xml$ $1/feed.php?brand=$2 [L]
RewriteRule ^(.*)/feed.xml$ $1/feed.php
RewriteRule ^(.*)/category-([0-9]+)-b([0-9]+)-min([0-9]+)-max([0-9]+)-attr([^-]*)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)\.html$ $1/category.php?id=$2&brand=$3&price_min=$4&price_max=$5&filter_attr=$6&page=$7&sort=$8&order=$9
RewriteRule ^(.*)/category-([0-9]+)-b([0-9]+)-min([0-9]+)-max([0-9]+)-attr([^-]*)\.html$ $1/category.php?id=$2&brand=$3&price_min=$4&price_max=$5&filter_attr=$6
RewriteRule ^(.*)/category-([0-9]+)-b([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)\.html$ $1/category.php?id=$2&brand=$3&page=$4&sort=$5&order=$6
RewriteRule ^(.*)/category-([0-9]+)-b([0-9]+)-([0-9]+)(.*)\.html$ $1/category.php?id=$2&brand=$3&page=$4
RewriteRule ^(.*)/category-([0-9]+)-b([0-9]+)(.*)\.html$ $1/category.php?id=$2&brand=$3
RewriteRule ^(.*)/category-([0-9]+)(.*)\.html$ $1/category.php?id=$2
RewriteRule ^(.*)/goods-([0-9]+)(.*)\.html$ $1/goods.php?id=$2
RewriteRule ^(.*)/article_cat-([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)\.html$ $1/article_cat.php?id=$2&page=$3&sort=$4&order=$5
RewriteRule ^(.*)/article_cat-([0-9]+)-([0-9]+)(.*)\.html$ $1/article_cat.php?id=$2&page=$3
RewriteRule ^(.*)/article_cat-([0-9]+)(.*)\.html$ $1/article_cat.php?id=$2
RewriteRule ^(.*)/article-([0-9]+)(.*)\.html$ $1/article.php?id=$2
RewriteRule ^(.*)/brand-([0-9]+)-c([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)\.html $1/brand.php?id=$2&cat=$3&page=$4&sort=$5&order=$6
RewriteRule ^(.*)/brand-([0-9]+)-c([0-9]+)-([0-9]+)(.*)\.html $1/brand.php?id=$2&cat=$3&page=$4
RewriteRule ^(.*)/brand-([0-9]+)-c([0-9]+)(.*)\.html $1/brand.php?id=$2&cat=$3
RewriteRule ^(.*)/brand-([0-9]+)(.*)\.html $1/brand.php?id=$2
RewriteRule ^(.*)/tag-(.*)\.html $1/search.php?keywords=$2
RewriteRule ^(.*)/snatch-([0-9])\.html$ $1/snatch.php?id=$2
RewriteRule ^(.*)/group_buy-([0-9])\.html$ $1/group_buy.php?act=view&id=$2
</IfModule>

Apache 虛擬主機用戶:

RewriteEngine On
#RewriteBase /
# direct one-word access
RewriteRule ^index\.html$ index\.php [L]
RewriteRule ^category$ index\.php [L]
# access any object by its numeric identifier
RewriteRule ^feed-c([0-9]+)\.xml$ feed\.php\?cat=$1 [L]
RewriteRule ^feed-b([0-9]+)\.xml$ feed\.php\?brand=$1 [L]
RewriteRule ^feed\.xml$ feed\.php [L]
RewriteRule ^category-([0-9]+)-b([0-9]+)-min([0-9]+)-max([0-9]+)-attr([^-]*)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)\.html$ category\.php\?id=$1&brand=$2&price_min=$3&price_max=$4&filter_attr=$5&page=$6&sort=$7&order=$8 [QSA,L]
RewriteRule ^category-([0-9]+)-b([0-9]+)-min([0-9]+)-max([0-9]+)-attr([^-]*)(.*)\.html$ category\.php\?id=$1&brand=$2&price_min=$3&price_max=$4&filter_attr=$5 [QSA,L]
RewriteRule ^category-([0-9]+)-b([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)\.html$ category\.php\?id=$1&brand=$2&page=$3&sort=$4&order=$5 [QSA,L]
RewriteRule ^category-([0-9]+)-b([0-9]+)-([0-9]+)(.*)\.html$ category\.php\?id=$1&brand=$2&page=$3 [QSA,L]
RewriteRule ^category-([0-9]+)-b([0-9]+)(.*)\.html$ category\.php\?id=$1&brand=$2 [QSA,L]
RewriteRule ^category-([0-9]+)(.*)\.html$ category\.php\?id=$1 [QSA,L]
RewriteRule ^goods-([0-9]+)(.*)\.html$ goods\.php\?id=$1 [QSA,L]
RewriteRule ^article_cat-([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)\.html$ article_cat\.php\?id=$1&page=$2&sort=$3&order=$4 [QSA,L]
RewriteRule ^article_cat-([0-9]+)-([0-9]+)(.*)\.html$ article_cat\.php\?id=$1&page=$2 [QSA,L]
RewriteRule ^article_cat-([0-9]+)(.*)\.html$ article_cat\.php\?id=$1 [QSA,L]
RewriteRule ^article-([0-9]+)(.*)\.html$ article\.php\?id=$1 [QSA,L]
RewriteRule ^brand-([0-9]+)-c([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)\.html brand\.php\?id=$1&cat=$2&page=$3&sort=$4&order=$5 [QSA,L]
RewriteRule ^brand-([0-9]+)-c([0-9]+)-([0-9]+)(.*)\.html brand\.php\?id=$1&cat=$2&page=$3 [QSA,L]
RewriteRule ^brand-([0-9]+)-c([0-9]+)(.*)\.html brand\.php\?id=$1&cat=$2 [QSA,L]
RewriteRule ^brand-([0-9]+)(.*)\.html brand\.php\?id=$1 [QSA,L]
RewriteRule ^tag-(.*)\.html search\.php\?keywords=$1 [QSA,L]
RewriteRule ^snatch-([0-9]+)\.html$ snatch\.php\?id=$1 [QSA,L]
RewriteRule ^group_buy-([0-9]+)\.html$ group_buy\.php\?act=view&id=$1 [QSA,L]
RewriteRule ^auction-([0-9]+)\.html$ auction\.php\?act=view&id=$1 [QSA,L]

SupeV1.0beta 規則

Apache 獨立主機用戶:

<IfModule mod_Rewrite.c>
RewriteEngine On
RewriteRule ^(.*)/ivideo(-tv-([0-9]+))?(-ti-([0-9]+))?(-tc-([0-9]+))?(-page-([0-9]+))?\.html$ $1/ivideo.php?tv=$3&ti=$5&tc=$7&page=$9
RewriteRule ^(.*)/ispecial(-tv-([0-9]+))?(-ti-([0-9]+))?(-tc-([0-9]+))?(-page-([0-9]+))?\.html$ $1/ispecial.php?tv=$3&ti=$5&tc=$7&page=$9
RewriteRule ^(.*)/icategory\.html$ $1/icategory.php
RewriteRule ^(.*)/category-cid-([0-9]+)(-tag-([^-]*))?(-timelimit-([0-9]+))?(-orderlimit-([0-9]+))?(-page-([0-9]+))?\.html$ $1/category.php?cid=$2&tag=$4&timelimit=$6&orderlimit=$8&page=$10
RewriteRule ^(.*)/vspace-(mid|username)-(.+)\.html$ $1/vspace.php?$2=$3
RewriteRule ^(.*)/video-(vid|ivid)-(.+)\.html$ $1/video.php?$2=$3
RewriteRule ^(.*)/special-spid-([0-9]+)\.html$ $1/special.php?spid=$2
</IfModule>

Apache 虛擬主機用戶:

# 將 RewriteEngine 模式打開
RewriteEngine On
# 修改以下語句中的 /SupeV 為你的播客目錄地址,如果程序放在根目錄中,請將 /SupeV 修改為 /
RewriteBase /SupeV
# Rewrite 系統規則請勿修改 RewriteRule
RewriteRule ^ivideo(-tv-([0-9]+))?(-ti-([0-9]+))?(-tc-([0-9]+))?(-page-([0-9]+))?\.html$ ivideo.php?tv=$2&ti=$4&tc=$6&page=$8
RewriteRule ^ispecial(-tv-([0-9]+))?(-ti-([0-9]+))?(-tc-([0-9]+))?(-page-([0-9]+))?\.html$ ispecial.php?tv=$2&ti=$4&tc=$6&page=$8
RewriteRule ^icategory\.html$ icategory.php
RewriteRule ^category-cid-([0-9]+)(-tag-([^-]*))?(-timelimit-([0-9]+))?(-orderlimit-([0-9]+))?(-page-([0-9]+))?\.html$ category.php?cid=$1&tag=$3&timelimit=$5&orderlimit=$7&page=$9
RewriteRule ^vspace-(mid|username)-(.+)\.html$ vspace.php?$1=$2
RewriteRule ^video-(vid|ivid)-(.+)\.html$ video.php?$1=$2
RewriteRule ^special-spid-([0-9]+)\.html$ special.php?spid=$1

UCHome1.0 規則

Apache 獨立主機用戶:

RewriteEngine On 
RewriteRule ^/(space|network)\-(.+)\.html$ /$1.php?Rewrite=$2 [L] 
RewriteRule ^/(space|network)\.html$ /$1.php [L] 
RewriteRule ^/([0-9]+)$ /space.php?uid=$1 [L] 

Apache 虛擬主機用戶:

RewriteEngine On 
RewriteBase / 
RewriteRule ^(space|network)\-(.+)\.html$ $1.php?Rewrite=$2 [L] 
RewriteRule ^(space|network)\.html$ $1.php [L] 
RewriteRule ^([0-9]+)$ space.php?uid=$1 [L] 

當然,在我們每個發布的程序包中,都有關于此版本程序對應的 Rewrite 規則,大家可以在那里找到相對應的 Rewrite 規則。

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/news/276635.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/276635.shtml
英文地址,請注明出處:http://en.pswp.cn/news/276635.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

情 人 節 快 樂

我不善于用詞匯修飾我的句子&#xff0c; 我不善于用表情表達我的心情&#xff0c; 我不善于解讀你那黯然的情緒&#xff0c; 我不善于去響應你小小的呼應&#xff0c; 雖然&#xff0c;你了解我&#xff0c; 你寬容于我&#xff0c; 你聽我訴說&#xff0c; 你陪伴著我…

Windows 10系統安裝JDK1.8與配置環境

第一步&#xff1a;下載JDK1.8 地址:https://www.oracle.com/index.html 第二步&#xff1a; 安裝分兩次&#xff0c;第一次是安裝 jdk &#xff0c;第二次是安裝 jre 。安裝jdk默認的安裝地址為C盤&#xff0c;安裝目錄 \java 之前的目錄修改成你想放的目錄&#xff1b;安裝jr…

python3函數調用時間_Python3 time clock()方法

Python3 time clock()方法 描述 Python 3.8 已移除 clock() 方法 可以使用 time.perf_counter() 或 time.process_time() 方法替代。 Python time clock() 函數以浮點數計算的秒數返回當前的CPU時間。用來衡量不同程序的耗時&#xff0c;比time.time()更有用。 這個需要注意&am…

給apache安裝mod_rewrite模塊

給apache安裝mod_rewrite模塊 原文鏈接&#xff1a;http://opkeep.com/system/linux/apache_mod_rewrite.html 只是用來做參考,相關情況可跟據自己的需求進行修改 如果你的服務器apache還沒有安裝&#xff0c;那很簡單&#xff0c;在編譯apache時將mod_rewrite模塊編譯進去就可…

Oracle9i 問題匯總--不斷更新中

1.創建數據表時&#xff0c;用戶表空間不足&#xff0c;解決方法 ALTER USER USERNAME QUOTA UNLIMITED ON USERS 2.避免在On條件上使用字符串串連 或者 函數。 如&#xff1a;ON 0||S.LIST_NOMS.EXTEND_FIELD 以上SQL語句會造成查詢嚴重變慢&#xff0c;如果非要使用請使用&…

武漢區塊鏈軟件公司:區塊鏈游戲和普通的游戲有什么區別?

武漢區塊鏈軟件公司:區塊鏈游戲和普通的游戲有什么區別&#xff1f;最近&#xff0c;各公鏈DAPP的開發呈迸發之勢&#xff0c;其中有虛擬財物使用的游戲就天然有上鏈的優勢。區塊鏈游戲也被認為是繼金融范疇之后第二個取得區塊鏈落地使用場景范疇。為什么游戲類DAPP能得到快速展…

git安裝與配置_git 安裝及基本配置

git 基本上來說是開發者必備工具了&#xff0c;在服務器里沒有 git 實在不太能說得過去。何況&#xff0c;沒有 git 的話&#xff0c;面向github編程 從何說起&#xff0c;如同一個程序員斷了左膀右臂。你對流程熟悉后&#xff0c;只需要一分鐘便可以操作完成原文地址: 服務器 …

Apache偽靜態學習

原文鏈接&#xff1a;http://www.benben.cc/blog/?p305 Apache中有著這樣一個模塊&#xff0c;它默默無聞&#xff0c;卻是URL操作的瑞士軍刀&#xff01;有人這樣評價它&#xff1a;“盡管它的例子和文檔數量可以以噸來計算&#xff0c;但它仍然是巫術&#xff0c;該死的巫術…

不同的容器里實現 RadioButton的單選

請教一個各位牛人一個問題&#xff0c;如圖&#xff1a; &#xff08;問題解決&#xff0c;見后面的解決方案~~&#xff09; 怎么在不同的winform容器(GroupBox)里實現 RadioButton &#xff08;如圖中兩個“詳細照會”&#xff09;的單選&#xff0c;請各位牛人給出實現的思…

html調用接口_搜狗ocr識別接口

詳細情況在代碼中說明&#xff0c;如果不想自己使用TensorFlow&#xff0c;可使用下面接口這是要識別的圖片&#xff1a;最終識別的結果&#xff1a;This is a lot of 12 point text to test theocr code and see if it works on all typesof file format.The quick brown dog …

CSAcademy Or Problem

傳送門 一口大鍋&#xff08; 斜率的確是有單調性 并且可以進行凸優化的 明明是證出來的 為什么自己就不相信呢&#xff08; 我們發現對于當前點作為擴展的右端點 那么他前面至多有20個點會影響到這一段區間的或值 我們可以預處理記錄出來這些節點的位置 很明顯 答案隨著右端點…

apache的rewrite模塊實例操作

原文鏈接&#xff1a;http://blog.5ilinux.com/archives/2006/01/apacherewrite.html 我們的目標是把http://www.bulknews.cn/show.php?id1014700通過rewrite的url重寫&#xff0c;使可以直接http://www.bulknews.cn/1014700.html訪問 1.首先配置apache的httpd.conf&#xf…

哈佛圖書館的二十條訓言

1.此刻打盹&#xff0c;你將做夢;而此刻學習&#xff0c;你將圓夢。 2.我荒廢的今日&#xff0c;正是昨日殞身之人祈求的明日。 3.覺得為時已晚的時候&#xff0c;恰恰是最早的時候。 4.勿將今日之事拖到明日。 5.學習時的苦痛是暫時的&#xff0c;未學到的痛苦是終生的。 6.學…

python截取關鍵字后的字符串_使用正則表達式獲取python中特定字符串之后的所有內容...

如果要使用正則表達式&#xff0c;請使用re.findall&#xff1a;re.findall((?<com/).*$, "www.example.com/thedubaimall") # [thedubaimall] 一些速度測試有DeepSpace的建議&#xff1a;%timeit re.findall((?<com/).*$, "www.example.com/thedubaima…

vue起手式

許久未曾更新文章&#xff0c;雖然不是程序員但還是忘懷不了擼碼的覺悟.1.VUE環境搭建安裝node.js (項目開發前準備) Node.js官網&#xff1a;https://nodejs.org/en/ 進入Node.js官網&#xff0c;選擇下載并安裝Node.js。安裝過程只需要點擊“下一步”即可&#xff0c;非常簡單…

C#編程盡量使用接口(轉)

.NET框架包括類和接口&#xff0c;在編寫程序的時候&#xff0c;你可能知道正在用.NET的哪個類。然而&#xff0c;在這種情況下如果你用.NET支持的接口而不是它的類來編程時&#xff0c;代碼會變得更加穩定、可用性會更高。請分析下面的代碼&#xff1a; private void LoadLi…

Apache 重寫規則的常見應用 (rewrite)

本文出自:http://www.linuxforum.net 作者:吳阿亭 Jephe wu (2001-09-05 08:00:00) 一:目的 本文旨在提供如何用Apache重寫規則來解決一些常見的URL重寫方法的問題&#xff0c;通過常見的 實例給用戶一些使用重寫規則的基本方法和線索。 二:為什么需要用重寫規則&#xff1…

python怎么模擬瀏覽器交互_干貨分享:python爬蟲模擬瀏覽器的兩種方法實例分析(趕緊收藏)...

今天為大家帶來的內容是&#xff1a;干貨分享&#xff1a;python爬蟲模擬瀏覽器的兩種方法實例分析&#xff08;趕緊收藏&#xff09; 文章主要介紹了python爬蟲模擬瀏覽器的兩種方法,結合實例形式分析了Python爬蟲模擬瀏覽器的兩種常見操作技巧與使用注意事項,需要的朋友可以參…

vue-cli3

github&#xff1a;https://github.com/vuejs/vue-cli org&#xff1a;https://cli.vuejs.org/ guide&#xff1a;https://cli.vuejs.org/guide/ config&#xff1a;https://cli.vuejs.org/config/ 轉載于:https://www.cnblogs.com/veritas-sj/p/10147789.html

Indy中判斷郵件來源

首先從TidMessage中獲得郵件的頭信息&#xff1a; strHeader:aIdMessage.Headers.text; 然后&#xff0c;用正則表達式取出Received: vReceiveIP:GetNeedStrByPerlReg(strHeader,(Received:)(.)(])); 再取出X-Originating-IP&#xff1a; vOriIP:GetNeedStrByPerlReg(strHea…