I took the long way home to the home page

Redirect ErrorI have built a lot of WordPress websites and all with different hosting providers, 1&1, BlueHost, HostGator,, and now Arvixe. On previous sites I normally put my WordPress site into its own directory and did a php redirect from the home directory to it. The advantages to this are as everyone landed in my home directory and a redirect sent them where I wanted them to go, I could always put a temporary page or a splash/landing page before the actual WordPress (referred to as WP after this) home page. This is good if you need to take the site down for repairs or you want to promote something and have them land there first. But when I tried to put my PHP redirect I kept getting a 500 error. Basically the .htaccess was preventing the execution of my PHP code. Anytime you see a 500 error, it is usually more often than not, execute permissions.

So if you visit my site as or as, I wanted it to land you in my WordPress site’s directory. I took the long way home.

Now I could have monkeyed with this but I don’t like to monkey around with the .htaccess files all that much. Monkey with it wrong and you can allow a lot more to happen than you really want. Or I could have monkeyed with the Apache config file and this is a lot more in my comfort level. Always make backups of files you are about to change. But I thought, well, I could just add a redirect. But I logged in to cPanel and there was Index Manager. Now I know what Index Manager is, but at 2am, my brain was not thinking clear for some reason. Index Manager is an automated way to money around with Apache to say, yes, allow directory listing, no, do not allow directory listing. As a rule unless you are hosting a bunch of files for people to download from your site and you are listing them out ftp style, you do not want to allow anyone to be able to traverse the file systems of your website. But I monkeyed with index manager attempting to change my home directory to be the WP one. But then some caffeine inside my body must have found its way to my brain and I awoke from this stumble. WAIT! Don’t mess with this, put it back. So I did. Do I went and added a redirect. But when it redirected I receive the error you see in the picture, “The webpage has a redirect loop” Chrome says, “this thing is trying to redirect multiple times and well, I ain’t having nothing of it”. And Chrome if you click “more” tells you the page tried to do five redirects in a row. Internet Explorer, well, it gives me a page saying it can’t display the page and there are no places for more information.

So I really should have given up and I would have figured out later in the day with more sleep and I had thought about moving the whole thing up one level and just do away with the WP directory. But I wasn’t brave enough that early in the morning to do that. But on a hunch, I decided to ask my provider who has live chat technical support 24/7. Now I have done the late night support thing in the past with some providers and I have decided that those who work third shift or weekend support just aren’t clever enough to figure out how to get a job on first shift. This isn’t always true, some times I find the most awesome support people who just prefer a night shift, but my theory helps explain a lot to allow me to be more patient with those working off hour shift support. But in this global economy, instead the Live chat support is a follow the sun model so it is day time for the guy I am chatting with and the customer in this case is the one not clever enough to wait until day light hours to work on a problem that should be cake. During chat we lost connectivity but the support person emailed me right away and we conversed via email. He suggested I look at this link.

Changing The Site URL

Now all of those solutions were good ones, but as databases are my favorite places to play, I chose to use the database solution. So I was ssh’ed into my site, so I moved everything from under the directory to the root home directory. Then I logged into phpmyadmin and found all occurrences of the old addresses and changed them to point to the new location and magically it all began to work. Okay, it wasn’t magic. It was expected, but sometimes things don’t always go according to play. If you are reading this, it must have worked.

Changing the URL in the database.

Christian | Father | Tech Evangelist | Author | Public Speaker | Future TEDx speaker |WordPress Aficionado * I am the author of "WordPress: Setup to Website". I love all things tech and gadgets and I probably have an opinion about it which some people seek out. Follow @aroyrichardson