The requested URL /about was not found on this ser

2020-02-16 06:42发布

The home page of my wordpress website seems to be displaying correctly but if you click through to any of the other pages I get the following error message:

Not Found

The requested URL /about was not found on this server.

Apache/2 Server at www.wildlionmedia.co.uk Port 80

I'm not sure whether it's a problem with the theme or the .htaccess file that is not being rewritten correctly.

http://www.wildlionmedia.co.uk/

Any ideas how I can resolve the issue?

# Switch rewrite engine off in case this was installed under HostPay.
RewriteEngine On

SetEnv DEFAULT_PHP_VERSION 53

DirectoryIndex index.cgi index.php

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

# END WordPress

17条回答
甜甜的少女心
2楼-- · 2020-02-16 07:16

in setting > permalinks wordpress set simple and test again.

查看更多
Root(大扎)
3楼-- · 2020-02-16 07:17

change only .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>
# END WordPress
查看更多
forever°为你锁心
4楼-- · 2020-02-16 07:18

There is a trusted answer on the Wordpress website:

Where's my .htaccess file?

WordPress's index.php and .htaccess files should be together in the directory indicated by the Site address (URL) setting on your General Options page. Since the name of the file begins with a dot, the file may not be visible through an FTP client unless you change the preferences of the FTP tool to show all files, including the hidden files. Some hosts (e.g. Godaddy) may not show or allow you to edit .htaccess if you install WordPress through the Godaddy Hosting Connection installation.

Creating and editing (.htaccess)

If you do not already have a .htaccess file, create one. If you have shell or ssh access to the server, a simple touch .htaccess command will create the file. If you are using FTP to transfer files, create a file on your local computer, call it 1.htaccess, upload it to the root of your WordPress folder, and then rename it to .htaccess.

You can edit the .htaccess file by FTP, shell, or (possibly) your host's control panel.

The following permalink rewrite code should be included in your .htaccess file (since WordPress 3.0):

# 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>
# END WordPress

*Taken from here.

查看更多
贼婆χ
5楼-- · 2020-02-16 07:21

I got the same issue. My home page can be accessed but the article just not found on the server.

Go to cpanel file manager > public_html and delete .htaccess.

Then go to permalink setting in WordPress, set the permalink to whatever you want, then save. viola everything back to normal.

This issue occurred after I updated WordPress.

查看更多
不美不萌又怎样
6楼-- · 2020-02-16 07:22

I am working on MacOS, following operation solved my problem:

I copied from : https://akrabat.com/setting-up-php-mysql-on-os-x-10-7-lion/

cd /etc/apache2

Give write permission the config file to root: sudo chmod u+w httpd.conf sudo vim httpd.conf

Find #LoadModule php5_module libexec/apache2/libphp5.so

and remove the leading #

Find #LoadModule rewrite_module libexec/apache2/mod_rewrite.so

and remove the leading #

Find AllowOverride None within the section and change to AllowOverride All so that .htaccess files will work.

Change permissions back: sudo chmod u-w httpd.conf

Restart Apache by running following in terminal:

sudo apachectl restart

查看更多
登录 后发表回答