You may have noticed that Vancouver Gadgets was offline yesterday for about 10 hours. It was a stressful time trying to figure out what happened but eventually with the help of Go Daddy technical support they were able to identify a problem with the .htaccess not working correctly. The issues began around 2:00 pm Friday afternoon with this error message showing on the Vancouver Gadgets homepage

The requested URL /[F] was not found on this server. Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request. Apache Server at vancouvergadgets.ca Port 80

Today I finally found my original .htaccess file which I had backed up to one of the 3 main computers that I use. Compared to the new one that got created I think I am pretty much right on the money. The file that ended up in the root directory for my website looked nothing like this and may have something to do with me investigating options for Ruby on Rails.

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

# END WordPress

Here’s the new .htaccess file that got created last night and as you can see it’s pretty much identical to the one above which is a good sign. Go Daddy recommended deleting the bad .htaccess file but didn’t provide any guidance around creating a new one or the content that should be included in the new one.

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

# END WordPress

.htaccess not working

Why is .htaccess not working and how can I restore this file?

So in order to delete the existing .htaccess I had to fire up Filezilla and FTP into my webhost. The file is located in the root of my domain which was super easy to locate. I deleted in but then needed WordPress to create another one. After scouring a couple of forums I was convinced that I would have to restore the site from backups but then found something about permalinks which solved the issue quickly and painlessly. Here are the steps.

  1. Delete the bad .htaccess file (this will get your homepage and admin console working again however none of the links will work on your website)
  2. Logon to your web admin console (wp-admin)
  3. Select the option Settings > Permalinks
  4. Choose the permalink option that you normally use (this is no time to start getting creative!)
  5. Now click save changes and the new .htaccess file should appear and all the links in your website should work again.

I hope this worked for you. If you run into any difficulties let me know and I’ll see if there’s anything I can do to assist. If you don’t feel comfortable making these changes you may want to involve your web host provider.

Jay

Tagged with:
 

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>