分类 技术相关 下的文章

1. 备份cnblog内容

76706-nsv0c5lie4e.png

下载导出工具php文件

下载地址:https://github.com/BackTrackCRoot/cnblogs-to-typecho

使用说明

2. 填写数据库配置导入

19380-mzvruh8jrs.png

3. 提示导入成功,发现博客导入成功!

45188-dkjf37mmrp7.png

注意事项:

如果提示,“It is not safe to rely on the system’s timezone settings”问题

第一行加入设置时区代码即可

<?php
ini_set('date.timezone','Asia/Shanghai');
if ($_SERVER['REQUEST_METHOD'] == 'POST')

开启了重写访问404找不到博文,是因为slug没值,通过下列语句更新,即可访问

update typecho_contents set slug = title where slug is null;

PHP2.4开启重写功能,修改配置文件
/etc/httpd/conf,找到对应的站点节点

AllowOverride All

对于低版本apache,需要引入对于的.so文件开启。

修改后重启apache

sudo service httpd restart 

验证是否开启成功

httpd -M

存在rewrite_module (shared),即表示开启成功!

提示无写入.htaccess文件是权限问题
chown -R apache:apache /var/www/html

如果保存设置时出现如下情况,重写功能检测失败,在你确保服务器配置没有问题的情况下,可以手动添加重写规则文件.htaccess到系统根目录,内容如下:

RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php [L,E=PATH_INFO:$1]

99302-h8xuv57za88.png

更多介绍,参考官方论坛:
http://forum.typecho.org/viewtopic.php?f=4&t=10782&p=40833&hilit=%E9%87%8D%E5%86%99%E5%8A%9F%E8%83%BD%E6%A3%80%E6%B5%8B%E5%A4%B1%E8%B4%A5#p40833

访问网站后台页面,显示Missing Config File 首页无异常 环境lamp,其它环境类似

解决方法:

检测php.ini的open_basedir 属性,注释掉

; open_basedir, if set, limits all file operations to the defined directory
; and below.  This directive makes most sense if used in a per-directory
; or per-virtualhost web server configuration file. This directive is
; *NOT* affected by whether Safe Mode is turned On or Off.
; http://php.net/open-basedir
;open_basedir = 

具体open_basedir用法参见:http://php.net/open-basedir

免责声明
本博客部分内容来自于互联网,不代表作者的观点和立场,如若侵犯到您的权益,请联系[email protected]。我们会在24小时内进行删除。