WordPress EC2上的永久链接 [英] Permalinks on Wordpress EC2

查看:50
本文介绍了WordPress EC2上的永久链接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚将博客从本地Web服务器转移到了Amazon EC2 Free Linux服务器,除永久链接外,一切似乎都可以正常工作,我禁用并重新启用了它们,但它仍然中断.

I have just transferred my blog from my local webserver to Amazon EC2 Free Linux server, Everything seems to be working now except for permalinks, I disabled and re-enabled them and it still breaks.

我已经尝试运行脚本

sudo a2enmod rewrite

但是它说a2enmod:以ec2-user身份登录我的服务器时找不到命令

But it says a2enmod: command not found while logged into my server as ec2-user

任何帮助将不胜感激!

谢谢

推荐答案

我也遇到了同样的问题,假设您使用的是httpd,则需要转到/etc/httpd/conf,然后通过运行sudo vi httpd.conf打开http.conf.然后将"AllowOverride"更改为:

I just had this same issue and, assuming you are using httpd, you will need to go to /etc/httpd/conf then open http.conf by running sudo vi httpd.conf and then change "AllowOverride" to:

<Directory />
    Options FollowSymLinks
    AllowOverride All
</Directory>

您可能还需要在此处更改AllowOverride All

You may also need to change AllowOverride All here:

# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
#   Options FileInfo AuthConfig Limit
#
    AllowOverride All

然后,您需要通过运行apachectl -k restart重新启动httpd.请注意,您可能需要实际运行sudo apachectl -k restart.

Then you need to restart httpd by running apachectl -k restart. Note, you may need to actually run sudo apachectl -k restart.

让我知道是否有帮助.

这篇关于WordPress EC2上的永久链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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