word press .htaccess deleted - all pages reporting 404 error


ok, so  you deleted the .htaccess file from the root folder of your word press site, you can see all pages in wp-admin, but none of them are loading and reporting 404 error. Here is a fix that worked for me. Create a .htaccess file with the following contents :

 

RewriteEngine On

RewriteBase /

RewriteRule ^index\.php$ - [L]

 

# add a trailing slash to /wp-admin

RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]

 

RewriteCond %{REQUEST_FILENAME} -f [OR]

RewriteCond %{REQUEST_FILENAME} -d

RewriteRule ^ - [L]

RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]

RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]

RewriteRule . index.php [L

 

 

upload it to the root folder and it should work.

 


© 2010 www.generalconnection.com. All rights reserved. | www.generalconnection.com