无法路由到Wordpress中的其他页面

时间:2020-07-10 19:47:37

标签: wordpress .htaccess wordpress-theming permalinks

我正在使用astra网站创建一个wordpress网站,当我单击“关于”或其他链接时,它会给我以下错误

Not Found
The requested URL was not found on this server.

Apache/2.4.29 (Ubuntu) Server at <my ip> Port 80

我还在index.php文件所在的目录中创建了一个.htaccess文件,并且也授予了权限。但这没有用。请帮助这是我的第一个wordpress网站。 以下是我目前的.htaccess

# BEGIN WordPress
# The directives (lines) between `BEGIN WordPress` and `END WordPress` are
# dynamically generated, and should only be modified via WordPress filters.
# Any changes to the directives between these markers will be overwritten.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress

1 个答案:

答案 0 :(得分:0)

以下要点之一将解决您的问题:

  1. 您可以尝试遵循以下提到的步骤吗?
  • 打开WordPress登录页面
  • 使用管理员凭据登录
  • 在管理面板的左侧栏中转到“设置”菜单
  • 单击“永久链接”子菜单项
  • 保存永久链接
  1. 如果要在本地计算机上设置此项目,请在下面几行中添加项目文件夹名称:

发件人: RewriteRule ^ index.php $-[L]

收件人: RewriteRule ^ foldername \ index.php $-[L]

发件人: RewriteRule。 /index.php [L]

收件人: RewriteRule。 /foldername/index.php [L]

  1. 如果您正在使用实时服务器,则可能需要从服务器的conf文件中删除限制