如何在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.mzph.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…