htaccess DirectoryIndex中断对Wordpress的访问? [英] htaccess DirectoryIndex breaks access to Wordpress?

查看:75
本文介绍了htaccess DirectoryIndex中断对Wordpress的访问?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在/ blog目录中有一个wordpress安装

I have a wordpress installation in my directory /blog

我最近将此行添加到了.htaccess中

I recently added this line to my .htaccess

DirectoryIndex /dgroup/index.php

现在我可以不再访问博客主页,我无法理解为什么。我什至尝试手动添加

Now I can´t access anymore the blog home page, and I can´t undestand why. I even tried to manually add

 RewriteRule ^blog/$ blog/index.php

没有结果。

可以从博客访问单个帖子,只是主页被破坏了。

It may be noteworthy that I can access single posts from the blog, just the home page is broken.

有什么想法吗?

感谢

更多详细信息:

由于我无法访问博客主页,我的意思是我收到错误404。

By I can´t access the blog home page anymore I mean that I get an error 404.

我要实现的只是将dgroup / index.php作为默认页面

What I am trying to achieve is simply to go on dgroup/index.php as default page

推荐答案


dgroup / index.php应该是默认页面

删除您的 DirectoryIndex 行并将此规则作为第一条规则在您的 DocumentRoot / .htaccess 中,用于在访问您域的首页时打开 /dgroup/index.php

Remove your DirectoryIndex line and place this rule as the very first rule in your DocumentRoot/.htaccess for opening /dgroup/index.php while visiting home page of your domain:

RewriteRule ^/?$ /dgroup/index.php [L]

这篇关于htaccess DirectoryIndex中断对Wordpress的访问?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆