三十而立

modoer下的文章

modoer用的是kindeditor,默认的编辑图标太多了,很多用不上,而且操作还不方便,所以动手精简下:
编辑 Modoer\core\lib 下的 editor.php

将:

$this->items['default'] = "
            ['source', '|', 'undo', 'redo', '|', 'preview', 'print', 'template', 'code', 'cut', 'copy', 'paste',
        'plainpaste', 'wordpaste', '|', 'justifyleft', 'justifycenter', 'justifyright',
        'justifyfull', 'insertorderedlist', 'insertunorderedlist', 'indent', 'outdent', 'subscript',
        'superscript', 'clearhtml', 'quickformat', 'selectall', '|', 'fullscreen', '/',
        'formatblock', 'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold',
        'italic', 'underline', 'strikethrough', 'lineheight', 'removeformat', '|', 'image', 'multiimage',
        'flash', 'media', 'insertfile', 'table', 'hr', 'emoticons', 'baidumap' $pagebreak,
        'anchor', 'link', 'unlink', '|', 'about']
        ";

替换为:

$this->items['default'] = "
            ['source', 'bold', 'forecolor', 'fontsize', 'multiimage', 'removeformat', 'clearhtml', 'link', 'unlink', 'underline', 'justifyleft', 'justifycenter', 'strikethrough', 'table',  'fullscreen']

效果如图:
TIM截图20171020212426.jpg

顿时世界就清静了...
参考:http://kindeditor.net/docs/option.html#items

modoer nginx伪静态,目录结尾形式

if ($uri !~ "^.*(.css|.js|.gif|.png|.jpg|.jpeg|.ico)$"){
set $rule_0 1$rule_0;
}
if (!-f $request_filename){
set $rule_0 2$rule_0;
}
if (!-d $request_filename){
set $rule_0 3$rule_0;
}
if ($rule_0 = "321"){
rewrite ^/(.*)$ /index.php?Pathinfo=$1 last;
}

modoer nginx伪静态,.html结尾形式

rewrite
 /(mylist|article|card|comment|coupon|exchange|fenlei|item|link|member|index|party|product|space|tuan|ucenter|ask|pay|graph|ask|review|shop|group|weixin|mobile).html$ /index.php?Rewrite=$1.html last;
    rewrite ^/(mylist|article|card|comment|coupon|exchange|fenlei|item|link|member|index|party|product|space|tuan|ucenter|ask|pay|graph|ask|review|shop|group|weixin|mobile)-(.+).html$ /index.php?Rewrite=$1-$2.html last;

nginx 301重定向

if ($http_host ~ "^abc.com"){
set $rule_0 1$rule_0;
}
if ($rule_0 = "1"){
rewrite ^/(.*)$ http://www.abc.com/$1 permanent;
}//把aa.com301重定向到www.abc.com

Apache 301跳转

RewriteCond %{HTTP_HOST} ^abc.com
RewriteRule ^(.*)$ http://www.abc.com/$1 [R=permanent,L]

Apache 伪静态

RewriteEngine On
# / 标识Modoer是在主域名或者二级域名下面,如果你的访问地址是www.modoer.com/modoer,就需要把 / 改成 /modoer
RewriteBase /
# 这是HTML伪静态部分
RewriteRule ^(mylist|article|card|comment|coupon|exchange|fenlei|item|link|member|index|party|product|space|tuan    |ucenter|ask|pay|graph|ask|review|shop|group|weixin|mobile)\.html$ index.php?Rewrite=$1.html [L]
    RewriteRule ^(mylist|article|card|comment|coupon|exchange|fenlei|item|link|member|index|party|product|space|tuan|ucenter|ask|pay|graph|ask|review|shop|group|weixin|mobile)\-(.+)\.html$ index.php?Rewrite=$1-$2.html [L,NC]

这是目录形式的URL改写

RewriteCond %{REQUEST_URI} !^.*(\.css|\.js|\.gif|\.png|\.jpg|\.jpeg|\.ico)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php?Pathinfo=$1 [L]

apache转nginx伪静态工具:
http://www.anilcetin.com/convert-apache-htaccess-to-nginx/