So you’ve installed WordPress and all of a sudden, when you clicked on older posts, it doesn’t work. This seems to be a problem that plagues many people and the situation hasn’t been solved.
The reality is it’s a misconfiguration in your apache vhost (if you’re using a vhost) or just the apache configuration. So, I’m going to solve this problem with one little line. Sound interested?
Here’s how you really solve the problem.
Assuming you’re using CentOS, just go to /etc/httpd/conf.d
Open up your vhost file for the appropriate domain and just copy and paste (of course modify your vhost settings to their appropriate settings and restart apache.
Do yourself a favor and do the one thing that nobody ever does. Don’t wipe out your existing config file, but instead, create a directory called ‘off’ (mkdir off) and move the conf file inside that directory.
Now just create a new conf file and put the following in it.
<VirtualHost 64.5.53.101:80>
<VirtualHost your.server.ip.address:port number>
DocumentRoot “[absolute path to your Document Root] example: /var/www/mywebsitefiles”
ServerName Your.websitename.domain
ServerAlias Any.Other.websites.domain
ErrorLog logs/www.swimminginthought.com-error_log
CustomLog logs/www.swimminginthought.com-access_log combined
DirectoryIndex index.html index.php index.html.var
<Directory “[absolute path to your Document Root] “>
Options All
AllowOverride All
Order Deny,Allow
Deny from all
Allow from all
</Directory>
</VirtualHost>
If you notice the line that starts with DirectoryIndex, it basically tells the vhost to use index.php as an index document. This is almost always what causes the problem. Just save the file and of course restart your web server.
“service httpd restart”
It should all work perfectly now!
Cheers!