wordpress IIRF伪静态规则

将以下规则保存为iirf.ini放到网站根目录即可实现伪静态。 RewriteBase / #store original URL in custom header (substitute for missing REQUEST_URI header in IIS) RewriteHeader X-REWRITE-URL: ^$ %{REQUEST_URI} #uploaded files RewriteRule ^(.*/)?files/$ index.php [L] RewriteCond %{REQUEST_URI} !.*wp-content/plugins.* RewriteRule ^(.*/)?files/(.*) wp-content/blogs.php?file=$2 [L] # add a trailing slash to /wp-admin RewriteCond %{REQUEST_URI} ^.*/wp-admin$ RedirectRule ^(.+)$ $1/ [R=301] RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule . – [L] RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-.*) $2 [L] RewriteRule Read More

彻底解决由require(‘./wp-blog-header.php’)导致的500错误

这个问题困扰我好几天了,今天总算是搞定了。 之前查了很多资料,断断续续做了不少功课。但都没实质性进展。 刚开始的症状就是首页500错,但是后台可以正常进入。 查资料找到如下方案 把 /** Loads the WordPress Environment and Template */require(‘./wp-blog-header.php’); 修改为 /** Loads the WordPress Environment and Template Read More

FTP在线备份Mysql数据(无需登录phpmyadmin or Cpanel等)

 其实有时候是会遇到这样的困惑的,因为某些原因不便或无法登录数据库的管理后台而又需要将数据备份出来的时候,这个时候也许就会手足无措了,那么我们在不登录数据库管理后台或者其他诸如Cpanel管理平台的情况下怎么将Mysql数据备份出来呢?很简单,只需要写一个代码文件就可以搞定。   在当前web目录下新建一个php文件(名字可以自定义,如:backupdatabase.php),添加以下内容:    Read More

解密DirectAdmin的Custombuild

1. What is custombuild?Custombuild is a tool, which can install/update: Apache 1.3, 2.0 or 2.2 AWstats Autoconf Automake cURL Dovecot Exim configuration files FreeType GD libiconv libjpeg libpng libmcrypt libmhash mod_perl MySQL PHP (with or without suPHP) 4, 5 or 6 ProFTPD Pure-FTPd SpamAssassin Webalizer Zend Optimizer Zlib Update web-applications as: Atmail Open webmail Roundcube webmail Squirrelmail webmail phpMyAdmin UebiMiau webmail 2. Why should I use it?Custombuild is able to install PHP with suPHP, all versions of PHP (4,5,6), Pure-FTPd, SpamAssassin, ProFTPD, MySQL, Exim, RoundCube webmail, Atmail lite webmail, and so on. It has an options file, Read More