我从Windows服务器迁移到Linux之一,我很新的htaccess的。另外,我从/年/月/后向/后改变了我的永久链接结构。为了确保旧的搜索引擎的链接仍然工作添加以下行来这是工作的罚款重定向旧网址到新的htaccess的文件,但阅读:
I migrated from a Windows server to a Linux one and I am very new to htaccess. Also, I changed my permalinks structure from /year/month/post to /post . To make sure the old search engine links still worked I added the following line to the htaccess file which is working fine to redirect the old URLs to the new ones, but read on:
RedirectMatch 301 ^/([0-9]{4})/([0-9]{2})/(.*)$ http://www.keptlight.com/$3
现在,我的年/月档案馆始终指向网站根目录,因为/年/月/被剥夺。例如:
Now, my year/month archives always point to the site root since /year/month/ are being stripped. For instance:
www.keptlight.com/2014/02/orchis-is-coming-2/
正确重定向到:
is properly redirected to:
www.keptlight.com/orchis-is-coming-2/
但是,对于一个给定月份的月度职位:
But the monthly posts for a given month:
www.keptlight.com/2011/06 /
或任何其他年/月总是重定向到:
www.keptlight.com/2011/06/
or any other year/month is always redirected to:
www.keptlight.com
有没有办法来解决这个问题并正确显示每月的档案时,只有年/月/如下没有帖子标题域?
Is there a way to overcome this problem and properly display the monthly archives when only year/month/ follows the domain with no post title?
感谢你在前进。
杰马尔郑伊健
尝试
RedirectMatch 301 ^/([0-9]{4})/([0-9]{2})(/.+)+$ http://www.keptlight.com$3