Wordpress修改固定链接,配好重定向,依然404的解决方法
今晚被坑了好久,最后发现是缓存问题,好好记录下过程:
因为博客搬家的缘故,搞重定向前想把链接改美好一点,于是在Wordpress管理界面里修改固定链接,从 domain/title/ 改成 domain/year/month/day/title,改完居然不奏效,记得以前是可以的,为什们呢?
网络搜索一番,都是说没配重定向,可是我有啊,而且正确,我用的是SAE, 服务器是nginx, 不能改.htaccess,二是通过SAE自己的AppConfig,修改目录下的config.yaml文佳,改成
---
name: lmm333
version: 1
handle:
- rewrite: if (!is_file() && !is_dir() && path ~ "^/(.*)") goto "index.php/$1"
我的是对的,和网上的解决方案一模一样,改好之后首页的链接都自动变成了新的有年月日格式,但点击还是404,手打没年月日的网页就可以,然后就陷入很久的百思不得其解当中。
一会儿,有个思路是查查是不是有缓存:
-
修改网站的配置文件,让网站强制刷新,不起作用
-
查看wordpress是不是装了缓存插件比如wordpress-cache什么的,详细过了一遍开启的插件列表,没有
-
突然发现插件列表最上面有个“Drop-in高级插件”的东西从来没见过,点开,果然是一个叫做object-cache.php的文件,好像是SAE memcache的插件,于是去了wp-content目录,强制删除了这个文件,药到病除~!
2015清单
读书
今年只读完了13本书,超过去年成为大学以来读书第二少的一年,一月份读了前4本,二月看了5-6,五月份摔车受伤在家躺着读了第7-11本,七月份读完12-13,其他月份都没读书,尤其是下半年开始搞运动,业余时间都是看攻略/买装备/报报报,读书完全荒废,就连kindle都几个月没开过机。。。2016还是希望能多读点书,至少也要做到读的比买的多吧~~~
- 文化不苦旅 推荐,马伯庸的北伐游记,不仅写得精彩,而且实战性强,我照着这个游记也自驾了孔明北伐之路,非常完美,全程没出岔子~
- 大教堂与集市 一般,讲黑客文化的
- 精益创业 : 新创企业的成长思维 好书!快速迭代的软件开发思想,也能活用在生活上~
- 从0到1 : 开启商业与未来的秘密 这是我的第一本在中文版上市前就读完的书,满足了一点小小的虚荣,就内容而言,实战性不如《精益创业》~
- 断舍离 推荐,今年对我价值观塑造最大的一本书~!
- 断舍离(心灵篇) 还行,上一本的深化~
- 谁是谷歌想要的人才 : 破解世界最顶尖公司的面试密码 不行,适合外行看,业内一眼就能看出来里面题目都是唬人的
- 我在哈佛学到的人脉课 标题党,内容没太多亮点
- 我如何获得40国签证 烂书,十年前出版的时候可能还有点价值
- 寻路中国 : 从乡村到工厂的自驾之旅 好看,对中国改革开放极其细致的描写,作者居然是外国人!
- 一年不花钱 : 我的无货币主义生活 有趣,很极端也很
- 后望书 好看,好了吴晓波的推荐后购买,反思了经济建设中的重大失误,看完第一章潼关就感觉值回定价~
- 创意的生成 有趣,半个下午就能看完,概括起来几十个字就够了,可操作性极强~
电影
今年共看电影26部,其中今年的新片21部,电影院看了18部,三个数据都是人生新高。 2016应该还会继续这种把看电影当做下班后放松的生活方式~
醉美杭州雪景,最虐比赛经历——记2015杭州西部越野
背景:
- 比赛:杭州西部越野,有15/30/45km三个组别
- 时间:2015年12月5日 周六
- 强度:30km 2100爬升,个人实际数据32公里2500爬升,7h33m完赛
- 参赛缘由:杭州是中国越野跑之都,每年80多场比赛,几乎每个周末都有,作为江浙一带的越野新人,去杭州比赛是必经之路呀,今年的西部越野时间合适,门槛又够,报报报~!
- 比赛目的:算是为了港百拉练,前4场比赛分别为10km 21km 30km 42km,西部越野是第三场,就报了30km 2100爬升,台阶为主。
- 同行:去年苏州又十几人来,今年只有我和小鸡快跑两人,苏州越野大神们都表示,西部越野台阶太多,爬一次就够了~
赛前
- 周五下班就赶上了去杭州的高铁,由于没买到合适的车子二等座卖光了,被迫买了一等座,从头睡到尾
- 七点多赶到杭州,小伙伴推荐了知味观,一人食,点了片儿川和蟹黄小笼包
- 赶到宾馆,拍完定妆照,碎觉,结果夜里太兴奋,不仅醒了好几次,还流了鼻血,一共只睡了2-3小时吧
My wordpress blog on Azure
2015-12-30 Disable Plugin Replace-Google-Fonts
- Website very slow load, F12 tells me that LINK is time out
- LINK is able to load under GFW
- So decative Plugin Replace-Google-Fonts
2015-12-30 Update DNS
- Move dns from the default sundns.com to dnspod.cn
- Step1. In sundns.com, change dns address to f1g1ns1.dnspod.cn
- Step2: In dnspod.cn, add A name and C name
- Step3. In Azure manage page, get awverify url and set in dnspod.cn, such as awverify.www -> cname-> awverify.lmm333wiki.azurewebsites.net, Do this for both blog and wiki
2015-12-02 Add Archives page
- Install plugin Archivist
- In plugin setting page, personalize archives page
- Add new page with [Archivist]
2015-04-30 Add view counts for each posts
- Install latest wp-postviews plugin(1.70)
- Edit Contest.php, add <?php if(function_exists(‘the_views’)) { the_views(); } ?> after <span class="comments-link">
2015-02-07 Add Disqus
- Switch comments system form wumii to disqus, wumii support Chinese accounts logging such as QQ and weibo, but my posts hardly got comments within it. Since disqus is widely used in wp and gitbub blogs, I decide to try it, I didn’t lose too much comments by this switch.
2015-01-31 Speed Up
- Perf is terrible when loading, tried many ways, finally, the root casue is google font blocked by the ‘wall’
- Scale site to 2 cores, 3.5G
- Set ‘always on’ on Azure site control pannel
- Scale clearDB(MySQL) to improve sql performance(free plan is 20M in all , 13M now for blog+wiki )
- F12 site loading processs, everything is ok(include site and flickr hosted photos), except ‘fonts.googleapis.com/css?family=Lato’ takes about 15 to load but still, it was blocked by the wall, my solution is to use [http://libs.useso.com/ 360 cdn ] and [http://www.amznz.com/fonts-googleapis-com-load-slow/ onts.googleapis.com加载慢解决办法 ] , install a plugin then active it
2014-09-26 Site Icon
- Add Meng favicon.ico to site(wiki and blog), so it has icon now
- Deploy the icon, FTP, one tricky is that the FTP address for the two sites(wiki and blog) is the same, user domain and pwd is different, my file explorer remember the user name and pwd of wiki, so I didn’t update the blog successfully first(I thought it is blog at first,haha)
2014-04-09 Template
- update WP version to 3.8.2, according to the introduction
- change template to twenty fourteen
- deactive the plugin MobilePress as the wp 3.8 support mobile well and the views data and Google ads data could be well calculated on mobile now
My MediaWiki on Azure
This is wiki about page, I will write down the edit log here.
Upgrade Media from v1.20 to v1.26 (Fix no content error)
- BUG: No content in page, but has content in edit page:bug detail
- From this Page , I found it’s unable to downgrade PCRE on Azure, the only way is to upgrade mediawiki
- Upgrate steps:
- Add to Git by azure web page in case rollback needed
- Clone to local, download v1.26 and merge files
- Run update.php for datebase upgrade from azure debug console page: https://lmm333wiki.scm.azurewebsites.net/DebugConsole
- cd to site\wwwroot, run “php maintenance/update.php “
- Update LocalSetting.php file from the Official Upgrate Guide
- Open site version page to check if all extension works well:
Add Google Analytic
2015-01-31 Change Logo
- edit $wgLogo to “favicon.ico” in LocalSettings.php in FTP folder
- http://www.dadclab.com/archives/1991.jiecao
2015-01-31 Add Mobile Support [Faled]
- Find mobile extension MobileFrontend Official site , Chinese Introduction
- MobileFronted need Mediawiki 1.24 at least, I am 1.20.3 now, Azure is 1.23 now
- “This version of MobileFrontend requires MediaWiki 1.24, you have 1.20.3. You can download a more appropriate version from https://www.mediawiki.org/wiki/Special:ExtensionDistributor/MobileFrontend”
2014-3-22 Add Markdown support
- find markdown extensions MarkdownSyntax in official extension page
- install the extension successfully with the wiki page and ftp login, remember the ftp user name is domain\user
2014-1-9
- find markdown extensions in official extension page
- install markdown extension MarkdownExtraParser , but failed finally
- note:
- AlternateSyntaxParser only support v1.6 or above, it won’t work on azure mediawiki now
2014-1-1 hello world
- hello world
- install mediawiki v1.2 in Azure
- add domain wiki.lmm333.com in azure management panel
- edit LocalSettings.php in wwwroot folder
- change $wgServer to “http://wiki.lmm333.com/”; ,so that links on wiki page will direct to wiki.lmm333.com, rather than azurewebsites.net
automate generated
MediaWiki has been successfully installed
Consult the [//meta.wikimedia.org/wiki/Help:Contents User’s Guide] for information on using the wiki software.
Getting started
- [//www.mediawiki.org/wiki/Manual:Configuration_settings Configuration settings list]
- [//www.mediawiki.org/wiki/Manual:FAQ MediaWiki FAQ]
- [https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce MediaWiki release mailing list]