gpt4 book ai didi

All Pages and Post are redirecting to 404 Not Found in wordpress(所有页面和帖子都重定向到在WordPress中找不到的404)

转载 作者:bug小助手 更新时间:2023-10-25 11:30:44 26 4
gpt4 key购买 nike



I am using wordpress, I have created 3 pages and 4 posts on my website. I am able to access the front page but the rest of the pages are showing 404 not found, Same for post also.

我正在使用WordPress,我已经在我的网站上创建了3个页面和4个帖子。我能够访问首页,但其余的页面显示404找不到,同样的帖子。


If I use some logic to fetch the pages or post then I am getting it but when I click on the view button it's showing

如果我使用某种逻辑来获取页面或帖子,那么我就会得到它,但当我单击查看按钮时,它会显示出来


Not Found

The requested URL was not found on this server.
Apache/2.4.41 (Ubuntu) Server at *.*.*.* Port 80 // I have hide the IP here

Would you help me out what is the issue with my code?

你能帮我解决一下我的代码有什么问题吗?


Below is the code that I am using in htaccess

以下是我在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
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress

# disable directory browsing
Options All -Indexes

# secure htaccess file
<Files .htaccess>
order allow,deny
deny from all
</Files>

# secure spesific files
<Files a_secret_file.php>
order allow,deny
deny from all
</Files>

The below is the code that I have in /etc/apache2/apche2.conf

下面是我在/etc/apache2/apche2.conf中拥有的代码


# access here, or in any related virtual host.
<Directory />
Options FollowSymLinks
AllowOverride All
Require all denied
</Directory>

<Directory /usr/share>
AllowOverride None
Require all granted
</Directory>

<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
<Directory /var/www/html>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>

更多回答

I have noticed that if I select the Permalink Settings plain option then all the pages are working.

我注意到,如果我选择固定链接设置普通选项,那么所有页面都可以正常工作。

U need to flush your permalinks follow this instructions link

您需要刷新永久链接,请按照此说明链接操作

@wazidshah, I have tried this so many times but still have the same issue

@wazidshah,我已经尝试了这么多次,但仍然有同样的问题

@wazidshah, the Plain URL is working but if I select the Post name URL then it's redirecting to 404 Not Found.

@wazidshah,普通URL正常工作,但如果我选择帖子名称URL,它将重定向到404 Not Found。

优秀答案推荐
更多回答

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com