I’m writing this article specifically for people hosted on godaddy that have had the following .htaccess, mod_rewrite or addhandler problems on shared or premium hosting accounts for various open source applications, such as (but not limited to) WordPress, Drupal, BBPress, Moodle, Geeklog, PHPNuke, Postnuke, and more!
Short list of potential issues:
- problems with permalinks in WordPress
- problems with clean URL’s in Drupal
- problems with pretty url’s in BBPress
- problems with WordPress MU
- ANY mod_rewrite problems in a sub-directory, subdomain, sub-folder, mapped domain, i.e., a domain you setup in goDaddy’s Domain Management -> Assign Domain to Hosting Site feature
I have struggled with two issues time and time again on a goDaddy shared or premium account. If I go into “Domain management -> Assign Domain” and “map” a domain to a folder of the root URL, I have problems with any site that needs to use an .htaccess file for “rewrite” the URL’s using a feature called “mod_rewrite” – especially WordPress and Drupal.
I came across a fix today that made all those problems go away forever. To be able to do what I’m about to tell you, you must also be hosting your domain name with goDaddy.
In your godaddy control panel, go to “Settings -> Domain Management”.
Click on “Add New Record“
In the very first line note the IP address of your “@” host, as you’ll by typing this into the box that comes up when you click to add a new record. In the first field type an asterik (*). In the second field type the IP address of your “@” host. Leave the drop down at one hour. Click “ok” to save.
That’s it – you’re done! There should be no fiddling with your .htaccess files at all.
Once I applied that simple fix – everything worked again.
I’ve also had problems when I’ve attempted to get .html or .htm files to parse PHP code as if they were .php files on goDaddy, or with applications that had to use PHP5. That fix is also really, really easy. All you have to do is create an .htaccess file with the following 2 lines:
AddHandler x-httpd-php5 .php
AddHandler x-httpd-php .php .htm html