My problems with .htaccess

The idea of setting up this blog came about me being able to do a review on the new iPad, however, for this to be the case, I had the task of resetting up a blog website before I got home from college to open the box. This left me with no choice, in order to set it up, I would have to set the blog up in college.

Since I was setting my blog up in college, due to the locked down policies you’d expect and the locked down firewall ports, there would be no way for me to access the website directory of my website via FTP, therefore, I would have to use the webspace explorer found in the control panel of my website host.

I took the lazy route to installing wordpress, instead of uploading the files and setting up databases by myself, I thought I’d let a cgi script do it for me,  a similar concept to Fantastico for those using cPanel. However, it failed to install onto the main directory and was complaining that it wasn’t empty, which obviously it wasn’t due to the folders of my sub-domains. In a blind panic, it lead to me deleting the previous index.html file and also the .htaccess. Doh!

However, it was not to be my day, the cgi script sill wouldn’t install onto the main directory, so I thought it’s time for plan b. Install inside a directory and then change the settings inside the wordpress settings to change the URL. This lead me to copy a new .htaccess from the wordpress installation into the public_html folder of my domain. Success, the blog would now be displayed at even though it was installed at a different directory.


Skip a few days forward, I’m working on a website for someone, and I upload the modified version to one of the sub-domains that occupied space in my public_html directory which may have been the reason why the wordpress cgi gave me troubles. However, when I came to view the website on a browser, I would get “error 403″  instead of being greeted by the homepage (index.html), I thought it was just an error with that sub-domain so, I tried a different sub-domain to find the same results uh oh… I’ve messed something up!

I concluded it was down to the .htaccess that I had deleted the day before which has lead to my websites not displaying properly, after a google session, I’ve now made a new .htaccess file and inserted it into the directories of all the sub-domains.

Here is the .htaccess of the one in the public_html folder:

# Switch rewrite engine off in case this was installed under HostPay.
RewriteEngine Off


DirectoryIndex index.cgi index.php

# BEGIN WordPress

# END WordPress

And this is the .htaccess that I’ve inserted into all my sub-domains:

DirectoryIndex index.rhtml index.html index.htm index.php

Here’s a question: Is it possible for me to merge them to into one in the public_html folder, or will it cause me problems?

Please, if you have any idea’s, comment below or contact me on twitter.

Leave a Reply

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

+ 2 = eight and Cookies - explained

Like most websites we use cookies to provide a more personalised and responsive service. We use cookies to enable our website to function more efficiently, to improve performance and view essential website statistics. If you continue we will assume you are happy to receive all the cookies from our website.

To accept cookies please Click To Continue