【问题标题】:.htaccess throwing my website in disarray.htaccess 让我的网站陷入混乱
【发布时间】:2014-01-11 14:51:27
【问题描述】:

我的网站发生了一些奇怪的事情。我在我的 .htaac​​cess 中添加了 DirectoryIndex wp/index.php。它工作正常,因为我的主页现在是 index.php,但是有一个副作用。现在,当我访问我的网站并单击一个链接时,虽然 url 是正确的,但它不会加载页面。相反,它会显示目录。为什么会发生这种情况?我可以做些什么来解决这个问题?

【问题讨论】:

  • 如果可能的话,把你的 htaccess 代码放在这里。

标签: php wordpress .htaccess mapping


【解决方案1】:

http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html 不是我认为会做的伎俩,但它确实做到了。仍然想知道如果有人有解决方案,为什么 DirectoryIndex 不起作用。

RewriteEngine on
RewriteRule ^$ foo/bar [L]

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-11-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-03-21
    • 2015-10-18
    相关资源
    最近更新 更多