404 error after changing wordpress permalinks

My site is a Wordpress-site created using PHP .

I made changes to the default constant for postname. It works fine in Chrome and Firefox , but not in IE8. The first page displays correctly, but when I click the link to another page, it shows a 404 page error.

I am using Wordpress version 3+.

.htaccess file

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

where WordPress is the name of the folder. also in apache rewrite_module is included

+8
php wordpress
source share
5 answers

First place the .htaccess file in the /var/www/ folder and make it writable. Secondly, suppose your Wordpress blog is located in the /var/www/blog folder, then go to /etc/apache2/sites-available/ and make the following changes to the default file

 <Directory /var/www/> Options +ExecCGI Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny allow from all </Directory> <Directory /var/www/blog/> Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny allow from all </Directory> 

Now restart apache to make sure the changes take effect. Hope this helps.

+22
source share

After completing all of these answers and instructions on codex.wordpress.org, I need to enable mod_rewrite in Apache: https://stackoverflow.com/a/312677/

+2
source share

Just go to wordpress / wp-admin, which will work anyway, and go to settings -> permalinks. When you go to this page, wordpress will rebuild your .htaccess file and everything will work again.

EDIT (FROM http://codex.wordpress.org/Using_Permalinks )

If the above does not work:

Unable to work with pagination

Sometimes switching to the second (and subsequent) message page does not work properly.

The result of clicking one of these links is that the page loads with the entire environment (heading, footer, sidebar), but instead of the message page, an error message appears: "Sorry, no messages meet these criteria."

This is due to a crash in the .htaccess file generated by WordPress. To fix this, delete the contents of your .htaccess file and recreate it.

From the control panel, go to "Management"> "Files" ("Additional information on editing files")

Click the link in the .htaccess file to change its contents.

Copy the contents of the file and paste it into a text file in a text editor. This is a precaution if your .htaccess file has manual entries for redirection, failures, or other useful htaccess tricks.

Remove all content from your .htaccess file and click the Update file button.

In Control Panel, go to Options> Permanent Links.

Click the Refresh Permanent Structure button to update the new rewrite rules for your permalinks.

Check the results using a previously broken link.

Add all htaccess entries manually to your file (place htaccess entries manually before # BEGIN WordPress or after # END WordPress lines.)

You can also perform similar steps by deleting .htaccess files from the server, creating a fresh empty .htaccess file, changing its permissions to 666, and then in Options β†’ Permalinks create a new set of htaccess rules by clicking the "Update permalink" button.

If this still doesn't work, check out the WordPress support forums, specifically http://wordpress.org/support/topic/permalink-nextpage-doesnt-work#post-283222

0
source share

I had the same problem locally, I tried all the above. After a while, I realized how vhost is configured for the application .htaccess is not enabled.

 <Directory "/Applications/XAMPP/htdocs/wordpress"> Options FollowSymLinks AllowOverride All Order allow,deny Allow from all </Directory> 

Adding these lines helped me and solved my problem.

0
source share

Enable rewrite_module in rewrite_module > Apache Moduels

-2
source share

All Articles