2016-04-29 75 views
0

我有一个网站是使用codeigniter框架设计的。对于板条箱博客页面我使用wordpress通过引用此链接click here如何更改codeigniter中的.htaccess文件以阅读wordpress博客?

使用此我已经创建了一个页面。但征求意见及其所有要 以下网址

http://localhost/mywebsite/blog/index.php/2016/04/29/my-new-blog/#respond 

因为.htacces限制其显示404错误页面

下面

是我已经试过我的.htaccess代码

RewriteEngine on 
RewriteCond $1 !^(index\.php|asset|info\.php) 
RewriteRule ^(.*)$ index.php?$1 [L] 
RewriteRule ^(blog)$ index.php?$1 [L] 

但它仍然不起作用

+0

在这个链接'http:// localhost/mywebsite/blog/index.php/2016/04/29/my-new-blog /#respond'是'blog'子目录吗?我明白它是一个控制器,所以它应该在'index.php'之后。 – Tpojka

回答

0

如果您已为您的博客单独安装wordpress。刚刚休耕的步骤

1)创建一个使用WordPress的仪表板页面称为博客

By page->new->blog->publish 

2)就让它作为头版

By settings->Front page displays->Posts page or front page->blog 

3)只需要复制该网页的网址你可以在codeigniter框架中使用它来打开博客

4)如果你在404有任何问题,那么你可以检查.htaccess或永久链接

Go to settings-> permalink-> set it as default ->Reload or refresh 
Then again now Go to settings-> permalink->postname 
Your .htaccess will get update with the permalink. 
+0

我在wp文件夹中存储了wordpress文件。现在它的工作,但链接鞋http:// localhost/mywebsite/wp/blog。我不想显示wp。 – Athi

+0

你想显示另一个链接,而不是此链接?如果是转到 - >网页 - >博客 - >标题,你可以看到固定链接:http:// localhost/mywebsite/blog你可以在这里更改。 –

+0

嗨,我选择了plain.but如果你去其他博客显示wp? – Athi