网站首页
栏目列表
内容详情
表单搜索
其他杂项
迅睿官方标签生成器
伪静态规则
nginx
location / { if (-f $request_filename) { break; } if ($request_filename ~* "\.(js|ico|gif|jpe?g|bmp|png|css)$") { break; } if (!-e $request_filename) { rewrite . /index.php last; } }
nginx二级目录手机站
location /m/ { if (-f $request_filename) { break; } if ($request_filename ~* "\.(js|ico|gif|jpe?g|bmp|png|css)$") { break; } if (!-e $request_filename) { rewrite . /m/index.php last; } } location / { if (-f $request_filename) { break; } if ($request_filename ~* "\.(js|ico|gif|jpe?g|bmp|png|css)$") { break; } if (!-e $request_filename) { rewrite . /index.php last; } }
apache
<IfModule mod_rewrite.c> RewriteEngine On RewriteBase / # 404页面 ErrorDocument 404 /404.html # 不带www跳转到www RewriteCond %{HTTP:Host} ^123.com$ RewriteRule (.*) http://www.123.com/$1 [NC,R=301] # xunruicms RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule !.(js|ico|gif|jpe?g|bmp|png|css)$ /index.php [NC,L] </IfModule>
apache二级目录手机站
<IfModule mod_rewrite.c> RewriteEngine On # 字体图标跨域 <FilesMatch "\.(ttf|ttc|otf|eot|woff|woff2|font.css|css)$"> Header set Access-Control-Allow-Origin "*" </FilesMatch> # 二级目录手机站伪静态放在m文件夹下 RewriteBase /m/ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule !.(js|ico|gif|jpe?g|bmp|png|css)$ /m/index.php [NC,L] </IfModule>
iis
<rewrite> <rules> <rule name="xunruicms IIS 伪静态" stopProcessing="true"> <match url=".(js|ico|gif|jpe?g|bmp|png|css)$" negate="true" /> <conditions> <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" /> <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" /> </conditions> <action type="Rewrite" url="/index.php" /> </rule> </rules> </rewrite>
iis电脑站和二级目录手机站
<rewrite> <rules> <rule name="xunruicms mobile" stopProcessing="true"> <match url="^mobile/(.*)$" ignoreCase="false"/> <conditions> <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true"/> <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true"/> </conditions> <action type="Rewrite" url="/mobile/index.php"/> </rule> <rule name="xunruicms PC" stopProcessing="true"> <match url=".(js|ico|gif|jpe?g|bmp|png|css)$" negate="true"/> <conditions> <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true"/> <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true"/> </conditions> <action type="Rewrite" url="/index.php"/> </rule> </rules> </rewrite>
图标与安全
location ~* \.(eot|ttf|woff2|svg|otf|woff)$ { add_header Access-Control-Allow-Origin *; } location ~* /(cache|config|dayrui|template)/ { return 403; } location ~* /(a|uploadfile|static|a|data|style|skin|images|css|js|templets|uploads)/(.*).(php)$ { return 403; }
自动清理缓存和更新缓存
php /www/wwwroot/xxxxxx/api/cron.php
ajax自动清理缓存和更新缓存
{if !is_file(WRITEPATH.'config/run_lock.php')} <script> $(function () { $.ajax({ type: "GET", dataType:"json", url: "{SITE_URL}index.php?s=api&c=run&is_ajax=1&num=5" }); }); </script> {/if}
织梦管理员密码
f297a57a5a743894a0e4
生成URL
伪静态规则
tag插件伪静态
// tag插件 "tag\/index.html" => "index.php?s=tag", "tag\/p([0-9]+).html" => "index.php?s=tag&page=$1", "tag\/(.+)\-([0-9]+)\.html" => "index.php?s=tag&name=$1&page=$2", "tag\/(.+)\.html" => "index.php?s=tag&name=$1",
Sitemap伪静态
// Sitemap 'sitemap.txt' => 'index.php?s=sitemap', 'sitemap.xml' => 'index.php?s=sitemap&c=home&m=xml',
织梦默认多层规则伪静态
// 织梦默认多层规则 "([\w\\/]+)\/list_([0-9]+)_([0-9]+)\.html" => "index.php?c=category&dir=$1&page=$3", "([\w\\/]+)" => "index.php?c=category&dir=$1", "([\w\\/]+)\/([0-9]+)_([0-9]+)\.html" => "index.php?c=show&id=$2&page=$3", "([\w\\/]+)\/([0-9]+)\.html" => "index.php?c=show&id=$2",
织梦默认单层规则伪静态
// 织梦默认单层规则 "([A-za-z0-9 \-\_]+)\/list_([0-9]+)_([0-9]+)\.html" => "index.php?c=category&dir=$1&page=$3", "([A-za-z0-9 \-\_]+)" => "index.php?c=category&dir=$1", "([A-za-z0-9 \-\_]+)\/([0-9]+)_([0-9]+)\.html" => "index.php?c=show&id=$2&page=$3", "([A-za-z0-9 \-\_]+)\/([0-9]+)\.html" => "index.php?c=show&id=$2",
织梦默认a多层规则伪静态
// 织梦默认a多层规则 "a\/([\w\\/]+)\/list_([0-9]+)_([0-9]+)\.html" => "index.php?c=category&dir=$1&page=$3", "a\/([\w\\/]+)" => "index.php?c=category&dir=$1", "a\/([\w\\/]+)\/([0-9]+)_([0-9]+)\.html" => "index.php?c=show&id=$2&page=$3", "a\/([\w\\/]+)\/([0-9]+)\.html" => "index.php?c=show&id=$2",
织梦默认a单层规则伪静态
// 织梦默认a单层规则 "a\/([A-za-z0-9 \-\_]+)\/list_([0-9]+)_([0-9]+)\.html" => "index.php?c=category&dir=$1&page=$3", "a\/([A-za-z0-9 \-\_]+)" => "index.php?c=category&dir=$1", "a\/([A-za-z0-9 \-\_]+)\/([0-9]+)_([0-9]+)\.html" => "index.php?c=show&id=$2&page=$3", "a\/([A-za-z0-9 \-\_]+)\/([0-9]+)\.html" => "index.php?c=show&id=$2",
导入规则
织梦默认多层规则
{"id":"4","type":"3","name":"织梦默认多层规则","value":"{\"list\":\"{pdirname}\",\"list_page\":\"{pdirname}\\\/list_{id}_{page}.html\",\"show\":\"{pdirname}\\\/{id}.html\",\"show_page\":\"{pdirname}\\\/{id}_{page}.html\",\"catjoin\":\"\\\/\"}"}
织梦默认单层规则
{"id":"4","type":"3","name":"织梦默认单层规则","value":"{\"list\":\"{dirname}\",\"list_page\":\"{dirname}\\\/list_{id}_{page}.html\",\"show\":\"{dirname}\\\/{id}.html\",\"show_page\":\"{dirname}\\\/{id}_{page}.html\",\"catjoin\":\"\\\/\"}"}
织梦默认a多层规则
{"id":"4","type":"3","name":"织梦默认a多层规则","value":"{\"list\":\"\\\/a\\\/{pdirname}\",\"list_page\":\"\\\/a\\\/{pdirname}\\\/list_{id}_{page}.html\",\"show\":\"\\\/a\\\/{pdirname}\\\/{id}.html\",\"show_page\":\"\\\/a\\\/{pdirname}\\\/{id}_{page}.html\",\"catjoin\":\"\\\/\"}"}
织梦默认a单层规则
{"id":"4","type":"3","name":"织梦默认a单层规则","value":"{\"list\":\"\\\/a\\\/{dirname}\",\"list_page\":\"\\\/a\\\/{dirname}\\\/list_{id}_{page}.html\",\"show\":\"\\\/a\\\/{dirname}\\\/{id}.html\",\"show_page\":\"\\\/a\\\/{dirname}\\\/{id}_{page}.html\",\"catjoin\":\"\\\/\"}"}
独立模块测试规则
{"id":"3","type":"1","name":"独立模块测试规则","value":"{\"module\":\"{modname}.html\",\"list\":\"{modname}\\\/list\\\/{id}.html\",\"list_page\":\"{modname}\\\/list\\\/{id}\\\/{page}.html\",\"show\":\"{modname}\\\/show\\\/{id}.html\",\"show_page\":\"{modname}\\\/show\\\/{id}\\\/{page}.html\",\"search\":\"{modname}\\\/search.html\",\"search_page\":\"{modname}\\\/search\\\/{param}.html\",\"catjoin\":\"\\\/\"}"}
共享模块测试规则
{"id":"2","type":"2","name":"共享模块测试规则","value":"{\"search\":\"{modname}\\\/search.html\",\"search_page\":\"{modname}\\\/search\\\/{param}.html\",\"catjoin\":\"\\\/\"}"}
共享栏目测试规则
{"id":"1","type":"3","name":"共享栏目测试规则","value":"{\"list\":\"list-{dirname}.html\",\"list_page\":\"list-{dirname}-{page}.html\",\"show\":\"show-{id}.html\",\"show_page\":\"show-{id}-{page}.html\",\"catjoin\":\"\\\/\"}"}
模板标签
正则替换
title
<title>(.*)</title>
替换title
<title>{$meta_title}</title>
keywords
<meta name="keywords"(.*)>
替换keywords
<meta name="keywords" content="{$meta_keywords}" />
description
<meta name="description"(.*)>
替换description
<meta name="description" content="{$meta_description}" />
mobile-agent替换为空
<meta http-equiv="mobile-agent" content="format=xhtml;url=(.*)">
mobile-agent替换为空
<script type="text/javascript">if(.*)</script>
dede:list
{dede:list(.*)}
替换module
{module catid=$catid order=updatetime page=1}
{/dede:list}
{/dede:list}
替换{/module}
{/module}
dede:pagelist
{dede:pagelist(.*)}
替换{$pages}
{$pages}
dede:type
{dede:type typeid='(\w*)'}
替换{category}
{category module=share id=\1}
dede:type
{dede:type typeid="(\w*)"}
{/dede:type}
{/dede:type}
替换{/category}
{/category}
批量设置
SQL语句
模块批量配置
UPDATE `dr_module` SET `setting` = '{\"sync_category\":\"0\",\"pcatpost\":\"1\",\"updatetime_select\":\"0\",\"right_field\":\"0\",\"desc_limit\":\"100\",\"verify_msg\":\"\",\"delete_msg\":\"\",\"order\":\"updatetime DESC\",\"search_time\":\"updatetime\",\"search_first_field\":\"title\",\"list_field\":{\"id\":{\"use\":\"1\",\"name\":\"Id\",\"width\":\"60\",\"center\":\"1\",\"func\":\"\"},\"title\":{\"use\":\"1\",\"name\":\"主题\",\"width\":\"\",\"func\":\"title\"},\"thumb\":{\"use\":\"1\",\"name\":\"缩略图\",\"width\":\"70\",\"func\":\"my_dr_thumb\"},\"catid\":{\"use\":\"1\",\"name\":\"栏目\",\"width\":\"130\",\"func\":\"catid\"},\"author\":{\"use\":\"1\",\"name\":\"笔名\",\"width\":\"120\",\"func\":\"author\"},\"updatetime\":{\"use\":\"1\",\"name\":\"更新时间\",\"width\":\"160\",\"func\":\"datetime\"}},\"flag\":null,\"param\":null,\"search\":{\"use\":\"1\",\"field\":\"title,keywords\",\"total\":\"500\",\"length\":\"4\",\"param_join\":\"-\",\"param_rule\":\"0\",\"param_field\":\"\",\"param_join_field\":[\"\",\"\",\"\",\"\",\"\",\"\",\"\"],\"param_join_default_value\":\"0\"}}';
模块Ueditor批量配置
UPDATE `dr_field` SET `setting` = '{\"option\":{\"down_img\":\"1\",\"watermark\":\"0\",\"show_bottom_boot\":\"1\",\"tool_select_2\":\"1\",\"tool_select_1\":\"1\",\"tool_select_3\":\"1\",\"tool_select_4\":\"1\",\"autofloat\":\"0\",\"remove_style\":\"0\",\"div2p\":\"1\",\"autoheight\":\"0\",\"page\":\"0\",\"mode\":\"1\",\"tool\":\"\'bold\', \'italic\', \'underline\'\",\"mode2\":\"1\",\"tool2\":\"\'bold\', \'italic\', \'underline\'\",\"mode3\":\"1\",\"tool3\":\"\'bold\', \'italic\', \'underline\'\",\"simpleupload\":\"0\",\"attachment\":\"0\",\"image_reduce\":\"\",\"image_endstr\":\"\",\"value\":\"\",\"width\":\"100%\",\"height\":\"400\",\"css\":\"\"},\"validate\":{\"xss\":\"1\",\"required\":\"1\",\"pattern\":\"\",\"errortips\":\"\",\"check\":\"\",\"filter\":\"\",\"tips\":\"\",\"formattr\":\"\"},\"is_right\":\"0\"}' WHERE `relatedname` = 'module' AND `fieldname` = 'content' AND `fieldtype` = 'Ueditor';
栏目Ueditor批量配置
UPDATE `dr_field` SET `setting` = '{\"option\":{\"down_img\":\"1\",\"watermark\":\"0\",\"show_bottom_boot\":\"1\",\"tool_select_3\":\"1\",\"autofloat\":\"0\",\"remove_style\":\"0\",\"div2p\":\"1\",\"autoheight\":\"0\",\"page\":\"0\",\"mode\":\"1\",\"tool\":\"\'bold\', \'italic\', \'underline\'\",\"mode2\":\"1\",\"tool2\":\"\'bold\', \'italic\', \'underline\'\",\"mode3\":\"1\",\"tool3\":\"\'bold\', \'italic\', \'underline\'\",\"simpleupload\":\"0\",\"attachment\":\"0\",\"image_reduce\":\"\",\"image_endstr\":\"\",\"value\":\"\",\"width\":\"100%\",\"height\":\"300\",\"css\":\"\"},\"validate\":{\"required\":\"0\",\"pattern\":\"\",\"errortips\":\"\",\"check\":\"\",\"filter\":\"\",\"tips\":\"\",\"formattr\":\"\"},\"is_right\":\"0\"}' WHERE `relatedname` = 'category-share' AND `fieldname` = 'content' AND `fieldtype` = 'Ueditor';
模块thumb批量配置
UPDATE `dr_field` SET `setting` = '{\"option\":{\"fieldtype\":\"VARCHAR\",\"fieldlength\":\"255\",\"input\":\"1\",\"ext\":\"jpg,gif,png,jpeg,svg,webp\",\"size\":\"10\",\"attachment\":\"0\",\"image_reduce\":\"\",\"is_ext_tips\":\"0\",\"css\":\"\"},\"validate\":{\"required\":\"0\",\"pattern\":\"\",\"errortips\":\"\",\"check\":\"\",\"filter\":\"\",\"tips\":\"\",\"formattr\":\"\"},\"is_right\":\"0\"}' WHERE `relatedname` = 'module' AND `fieldname` = 'thumb' AND `fieldtype` = 'File';
织梦图片集去多余注释
UPDATE `dr_1_image` SET `imgurls` = replace(`imgurls`,'\' width=','');
重置admin管理员密码为admin
UPDATE `dr_member` SET `password` = '62e69b828c74c50a1f6e93227cdf7e77', `salt` = '8d6dc35e50' WHERE `username` = 'admin';