Host Unlimited Web Sites for Only $10 per Month!
Powered by MaxBlogPress  

 

How to fix .htaccess file for mod_rewrite and addhandler on godaddy subdomain | JTPRATT's Blogging Mistakes
JTPratt's Blogging Mistakes





Home » How to fix .htaccess file for mod_rewrite and addhandler on godaddy subdomain


 
 
 

Posted in:

blog-setup category image drupal category image web-hosting category image wordpress category image
5,590 views


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
add new dns record in godaddy dns control panel

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.
adding a host record

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


12 Responses to “How to fix .htaccess file for mod_rewrite and addhandler on godaddy subdomain”

  1. cscelza Has the following to say...

    Thanks for figuring this out.

    One suggestion, I believe you meant “Settings -> DNS Manager” instead of “Settings -> Domain Management”…

    Otherwise, excellent information.

    Please edit (or delete) this comment after you edit you instructions.

    Thanks again.

  2. Apache, mod_rewrite and SEO | Edmonds Commerce Blog Has the following to say...

    [...] Blogs http://www.crazyleafdesign.com/blog/check-if-mod_rewrite-is-activated-on-your-server/ http://www.jtpratt.com/2008/01/22/how-to-fix-htaccess-file-for-mod_rewrite-and-addhandler-on-godaddy... http://pensae.com/2008/01/14/when-mod_rewrite-doesnt-work/ [...]

  3. Pink Munoz Has the following to say...

    I was wondering, what about build a niche store type sites? Is there any way to put them on a subdomain without problems?

    Pink Munoz’s last blog post..Depression Glass Patterns

  4. erica Munoz Has the following to say...

    is there a way to get bans sites to work like this?

    erica Munoz’s last blog post..Depression Glass Patterns

  5. admin Has the following to say...

    When I did this I was able to get my BANS site to work…

  6. Bjorn Has the following to say...

    WOW! Thanks! This worked for me with Wordpress!

  7. explorish Has the following to say...

    hi,
    i tried this too, but it said the subdomain is not valid! :(
    any clue?

  8. Joe Chellman Has the following to say...

    This was helpful to me. Very strange that setting up a wildcard could fix the mod_rewrite issue, but i’ll take it!

  9. ken Has the following to say...

    thanks.

    this was so helpful, i’m putting a link back to you on my site.

    ken

  10. admin Has the following to say...

    @Ken - thanks! That’s why I posted it, it was the instructions that “I” was missing when I had the same problem! =)]

  11. Jian Zhan Has the following to say...

    many thanks

    It works perfect.

    It is very helpful for many people

  12. Trader Vic Has the following to say...

    Thanks, this worked like a charm! Saved me a ton of time messing with .htaccess to no result, much appreciated.

Question or Comment?? Spill it Now...

Jumping for Joy over comments!

We Reward Comments!


We dofollow links, and get your latest blog post as a byline under every new comment from the "CommentLuv" plugin! Top commenters for every month are listed on every page of this site in a sidebar widget linked back to your URL! We would like to reward you for becoming part of our community! Your comment is valuable not only to us, but also all the other readers of this blog!
 

 


Click to add smilies to your post! = =[] ^=( =(( =(| =)r =|8 =0 =)~ =00 =( =;; =)] =;;;