首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >Wordpress EC2上的固定链接

Wordpress EC2上的固定链接
EN

Stack Overflow用户
提问于 2012-09-06 12:29:54
回答 7查看 16.1K关注 0票数 19

我刚刚把我的博客从本地服务器转移到亚马逊EC2免费Linux服务器上,现在一切似乎都正常了,除了固定链接,我禁用并重新启用了它们,但它仍然中断。

我试过运行这个脚本

sudo a2enmod rewrite

但它显示a2enmod:作为ec2-user登录到我的服务器时未找到命令

任何帮助都将不胜感激!

谢谢

EN

回答 7

Stack Overflow用户

回答已采纳

发布于 2012-09-18 10:30:04

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

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

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

# 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

如果有帮助,请告诉我。

票数 44
EN

Stack Overflow用户

发布于 2014-01-14 14:39:58

对于Ubuntu,请在以下位置更改"AllowOverride All“:

“我必须采取的额外步骤是编辑/etc/apache2/sites enabled/000-default。

在该文件中,您将发现/var/www的AllowOverride设置为"None“。

将设置更改为: AllowOverride All“

感谢ljonas @ http://wordpress.org/support/topic/solved-permalinks-working-in-apache2-ubuntu-1010

票数 2
EN

Stack Overflow用户

发布于 2016-11-27 08:39:29

这里有书面和视频说明https://a1websitepro.com/enable-pretty-permalinks-amazon-web-hosting/

    <Directory /var/www/html/>
     Options Indexes FollowSymLinks
     AllowOverride All
    </Directory>
票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/12292992

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档