My Wordpress blog was running since a long time. And Everything was working right. The problem started 2 days ago. Something happened with .htaccess file. And now, my home page is working as usually, but when i try to go on page or a post, nothings work. I got a 404 error with this message: 'The requested URL /my-page-or-post/ was not found on this server. Same error page comes when i even try to login to my wordpress admin page (/wp-admin). If i delete the .htaccess file, i can access admin page and home page but not individual posts pages. the post pages and homepage start working fine after i put .htaccess file back but admin page access is gone. heres my .htaccess file RewriteEngine on # -FrontPage- IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti* <Limit GET POST> order deny,allow deny from all allow from all </Limit> <Limit PUT DELETE> order deny,allow deny from all </Limit> AuthName avinashtech.com AuthUserFile /home/avinasht/public_html/_vti_pvt/service.pwd AuthGroupFile /home/avinasht/public_html/_vti_pvt/service.grp # BEGIN WPSuperCache <IfModule mod_rewrite.c> RewriteBase / AddDefaultCharset UTF-8 RewriteCond %{REQUEST_URI} !^.*[^/]$ RewriteCond %{REQUEST_URI} !^.*//.*$ RewriteCond %{REQUEST_METHOD} !=POST RewriteCond %{QUERY_STRING} !.*=.* RewriteCond %{HTTP:Cookie} !^.*(comment_author_|wordpress|wp-postpass_).*$ RewriteCond %{HTTP:Accept-Encoding} gzip RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html.gz -f RewriteRule ^(.*) /wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html.gz [L] RewriteCond %{REQUEST_URI} !^.*[^/]$ RewriteCond %{REQUEST_URI} !^.*//.*$ RewriteCond %{REQUEST_METHOD} !=POST RewriteCond %{QUERY_STRING} !.*=.* RewriteCond %{HTTP:Cookie} !^.*(comment_author_|wordpress|wp-postpass_).*$ RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html -f RewriteRule ^(.*) /wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html [L] </IfModule> # END WPSuperCache # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress RewriteCond %{HTTP_REFERER} !^http://avinashtech.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://avinashtech.com$ [NC] RewriteCond %{HTTP_REFERER} !^http://www.avinashtech.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://www.avinashtech.com$ [NC] RewriteRule .*\.(.*)$ - [F,NC] Code (markup):
Download new version of Wordpress, just upload the .htaccess file from that package to your server. All links will start working fine Just DISABLE WP-Supercache before doing all above stuff
Just recreate an empty .htaccess file, chmod it to 777 and log into your Dashboard to change the Permalinks settings. Should work after that. Disable all plugins before doing this however.
i did that but now i can only access wordpress wp-admin page and successful login too and homepage but cant access the post pages. I had to replcae back my old .htaccess file to make post pages accessible.
So problem solved ?? If not then disable WP-Super cache plugin and reenable it. It will add its rules to that .htaccess file.
NO, i did as u said about super cache but problem persist. I have totally disabled supercahe for time being. i can access the site well . i had to check if everything goes well for few days atleast.
So,... by disabling the super cache now u r site working fine ? If yes... re enable it, it will write .htaccess file as per its req.