How To Find And Modify .htaccess File For Redirecting Blogger To WordPress


 Last Update November 26th, 2016


Today's topic is about where to find and how to modify .htaccess file in Bluehost.

This tutorial is for those who need to find and modify their .htaccess file when moving or redirecting their Blogspot/Blogger blog to WordPress.org.

I know many of you can't find.htaccess file.

You keep reading stuff like the .htaccess file is somewhere in the "root" or "directory" indicated by the URL. 

Then they say the name of the file begins with a dot, so the file may not be visible through an FTP client FileZilla unless you change the preferences of the FTP tool to show all files, including the hidden files.

Sounds confusing?

I know for most of you who are a newbie or "technical-challenged" would find it more confusing and exasperating. Before, I was equally feeling lost too.

So where is .htaccess file located?

Since my domain file is hosted in Bluehost, so my  tutorial will only shows you how I find and modify my .htaccess file as in my Bluehost account.

In other words, you have to log in to your web hosting account.

Some of you may host your blog with HostGator or even GoDaddy. So you got to log in to your account there. 

Before you start modifying or make changes to your htaccess, prepare this code in your Notepad:

RedirectMatch permanent ^/[0-9]{4}/[0-9]{2}/([a-z0-9]+) http://yourblog.com/$1

Note: You need to change http://yourblog.com to your domain name.

Where To Find And How To Modify .htaccess File


1. Log in to Bluehost.

2. From cPanel, scroll to Files box.

3. Click File Manager and a box will pop up called File Manager Directory Selection.

4. Make sure the selection is set at: "Document Root for:" If not, then click on the small circle in front of the the remark "Document Directory Selection for". A small dot will appear.

5. Next you got to make your selection by clicking on the right hand side small blue box, to drop down the list.
 
6. Select your domain which you want to modify .htaccess file and click Go button.

7. You should see a page called File Manager Settings.

8. Click Change Permission and a box pop up.

9. You can see that it only ticked three boxes. Now you got to tick the remaining five (5) boxes. The Permission box should be triple seven: 777. Then click Change Permissions box.

10. Now on your page, you should see that .htaccess has the digits 0777 in the last column (Perms).

11. Now right click on the .htaccess row,  a grey colored box will pop up. Click Edit.


 12. Now you will see a box called Txt Editor warning you about the danger of messing with this codes! Just click Edit button.

13. You will see a white page with some texts.

14. Now carefully paste the code: RedirectMatch permanent ^/[0-9]{4}/[0-9]{2}/([a-z0-9]+)
BEFORE the line # BEGIN WordPress.

Now it should be like this:

RedirectMatch permanent ^/[0-9]{4}/[0-9]{2}/([a-z0-9]+) # 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

15. Click Save Changes.

That's all you need to do and how to modify .htaccess file.

Beware!: Be very careful with this .htaccess file. It is very sensitive!

If you accidentally screw up or they called  corrupt the .htaccess file, then you will see this message on your computer screen: Internal Sever Error (as shown below)

internal server error .htaccess
Once you have this problem, you cannot log into your admin page and your site is missing, except with the above message!  So, be very careful.

If you encounter this technical problem "Internal Server  Error" when you are fiddling with your .htaccess file, it will freak you out. Panic is the word!

You will be locked out, so to speak. As I have just said, you cannot log into your admin page and you will find that your blog is not available anymore!

Anyway, stop panicking.

Chances, it is you have a corrupted .htaccess file.

How To Fix Corrupted .Htaccess File


To solve  or fix your corrupted .htaccess file, you need to do these two main steps:

Step One: Renaming Your .Htaccess File

1. First you need to log in to your host server account. (Bluehost, Hostgator, etc).

I am using BlueHost as a guide in this tutorial.

2. Click at the "File Manager".

3. A box called "File Manager Directory Selection" pops up.

If you have more than one site, then select the one that is having the problem.

4. Click on the "Go" button. (Make sure the selection in the box is set at: "Document Root for")

5. Then you can see .htaccess file under the column called Name.

6. Right click on it.

7. A menu box pops up.

8. Click on the word "Rename".

9. A box will pop up titled "Rename".

10. You can see the name .htaccess.

11. Now replace it with a new name.

12. You can rename it as .htaccess_new

13. Then click the "Rename File" button.

14. That's all. Now you can log out.

15. Now try to access your blog. If you can see it, it means you have fixed the internal server error.

16. Now you should be able to see your admin page. The page where you log into your blog.

Step Two:

1. Now log into your admin page.

1. Click on "Settings".

2. Next click on "Permalinks".

3. Then click on the blue color "Save Changes" button.

This is to generate a new .htaccess file, so that you do not have the 404 Not Found Error.

Here is a tutorial on how to fix the problem when you screwed up WordPress Function template and you are locked out of your WordPress Dashboard.


Written by: Kher Cheng Guan