Chris Farrell Membership
SpinnerChief Pro
KeywordSpy
This site uses cookies. By continuing to browse the site, you are agreeing to our use of cookies. Find out more.

WordPress.org: Requested URL Was Not Found on this Server Investigation

 Posted by  Add comments
 

WordPress: Requested URL Was Not Found on this Server

Requested URL was not found on this server

How To Turn Off Post Revisions And Autosave In WordPress

This article is specifically related to the, “Requested URL not found on this server” error for WordPress 3 and above.

Background

First a little background for this scenario.

Recently, my hosting provider JustHost, upgrade my online system, PHP etc. so I decided to upgrade my localhost installation to match. As my local installation had become pretty cluttered I decided to simply delete everything and get a fresh install of Apache2, PHP and MySQL using the latest WampServer and WordPress.

  • WampServer is a Windows web development environment. It allows you to create web applications with Apache2, PHP and a MySQL database. Alongside, PhpMyAdmin allows you to manage easily your databases.

So, I installed Apache2, PHP, MySQL, a fresh install of WordPress and a copy of the KingSolutions online WordPress installation including the database in their own directories off the server root directory.

www\wp
www\wordpress

I configured the WordPress, wp-config.php, files appropriately for the WordPress installations.

  • In Settings > General, I set/checked the Site Title, Tagline, WordPress Address (URL), Site Address (URL), E-mail Address, Date/Time Format.
  • In Settings > Permalinks, I set the Custom Structure to: /%post_id%/%postname%/

In other words, I set everything as I normally would.

I then proceeded to test the installs.

Requested URL Was Not Found on this Server Error

To my surprise I found that none of my local WordPress installations would work. What really surprised me was the failure of the fresh WordPress installation.

WP Install Problem

The problem was this:

Initially, running both WP installations seemed fine. The home pages opened and contained the correct data, but, when any post or page link was clicked the, Requested URL not found on this server, error reared its head.

Having double checked both installs I decided to investigate the problem using the WordPress fresh install as this had no additional plugins or themes and was straight out of the box (as it were).

Fresh WordPress Installation Operation

After installation the WP admin side of the installation seemed to be working perfectly. The changes made in the admin panel were being saved to the database. I used phpMyAdmin to check this.

Then I checked the .htaccess file in the WP install directory. With the default permalink settings it should be empty:

# BEGIN WordPress

# END WordPress

With permalinks the following permalink rewrite code (generated automatically) should be included in your .htaccess file (since WordPress 3.0):

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

# END WordPress

This was also correct, which demonstrated that WP was updating the file and that .htaccess is writable.

I then decided to set everything back to WP defaults, starting with the permalinks.

  • Settings > Permalinks > Default: http://localhost/wp/?p=123

Not expecting anything spectacular to have happened I ran WP again. To my surprise everything was working.

I then tried changing the permalinks to, Day and name, Numeric, etc. the, Requested URL not found on this server, error returned each time.

Conclusion: The problem was related to permalinks.

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.

Requested URL Was Not Found on this Server Solution

After a little digging I discovered that the Apache httpd.conf file needed editing:

Change: #LoadModule rewrite_module modules/mod_rewrite.so
To: LoadModule rewrite_module modules/mod_rewrite.so

Requested URL Was Not Found on this Server Conclusion

During this investigation I’ve discovered that the, Requested URL not found on this server, issue is actually quite common. The problem being the failure to load any WordPress post or pages in the browser after a new installation and configuration. Links, though present, simply do not work.

Usually the problem arises after changing permalinks to a more search engine friendly URL structure. This results in the required .htaccess configuration either not being updated correctly or not being readable (as in my case).

It’s strange how the simplest things in life can throw a huge spanner in the works. If my hosting provider, JustHost, hadn’t upgraded my installation I would never have discovered this solution. I’m just grateful that JustHost managed the upgrades very efficiently, without a hitch and this problem did not rear its head with the KingSolutions online site.


KingSolutions.org.uk is hosted on JustHost

 Leave a Reply

(required)

(required)

86 queries in 0.976 seconds (Child).