在自己的目录安装Word preSS而永久失败 [英] Install WordPress in its own directory but permalink fails

查看:188
本文介绍了在自己的目录安装Word preSS而永久失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我安装了Word preSS在EC2上,位于的/ var / www / html等/字preSS 。我跟着字preSS引导的index.php和.htaccess复制到根是的/ var / www / html等,并修改index.php文件,并在管理设置面板。它的工作原理pretty的好,如果我坚持只默认链接,如: http://www.cubcanfly.com/?p=5 ,但是其他的永久链接选项失败,实际上所有的永久链接选项。

I installed WordPress on EC2, located in /var/www/html/wordpress. I followed the WordPress guide to copy index.php and .htaccess to root which is /var/www/html, and modified index.php and setting in admin panel. It works pretty well if I stick to only default link, such as: http://www.cubcanfly.com/?p=5, however other permalink options fails, actually all of the permalink options.

我的的.htaccess

# BEGIN WordPress
<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
</IfModule>

/etc/httpd/conf/httpd.conf中

LoadModule rewrite_module modules/mod_rewrite.so

不评论。

在此先感谢

推荐答案

最后,我发现这个问题。这是在httpd.conf中的AllowOverride选项,位于/etc/httpd/conf/httpd.conf中,命令查找/ -name httpd.conf中-print可以很容易地找到它。 我改变任何设置AllowOverride无 - >所有在那里我可以在文件中找到。这只是工作,甚至没有做任何改变的.htaccess

Finally I find the problem. It's the AllowOverride option in httpd.conf which is located in /etc/httpd/conf/httpd.conf, "sudo find / -name httpd.conf -print" can easily find it. I changed any AllowOverride NONE->ALL where i can find in the file. It just worked,even without doing any change to .htaccess

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
</IfModule>

本的.htaccess工作在哪个字preSS安装在自己的目录我的主机上。

This .htaccess works on my host in which wordpress is installed in its own directory.

感谢您@adlawson @Will,没有你,我无法找到问题。

Thank you @adlawson @Will, without you, I couldn't find the problem.

HTTP://$c$cx.word$p$pss.org/Using_Permalinks 这个官方指导价是很不够用,甚至字preSS安装在一个子目录固定链接。

http://codex.wordpress.org/Using_Permalinks this official guide is quite enough to use permalink even wordpress is installed in a sub directory.

这篇关于在自己的目录安装Word preSS而永久失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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