Apache 301 redirects on GoDaddy web hosting

I have a shared web hosting account on GoDaddy, and wanted to do a 301 redirect with an Apache .htaccess file. For some unknown reason GoDaddy’s web interface wasn’t working for this, so I thought I’d fix the problem manually.

In short, this did NOT work:

Redirect 301 /the-old-uri  http://alvinalexander.com/the-new-uri

The problem with GoDaddy shared web hosting is that you have to include the subdirectory your website is installed under, and in short, this solution DOES work:

Redirect 301 /the-subdirectory/the-old-uri  http://alvinalexander.com/the-new-uri

Once I put the subdirectory my website is installed under (i.e., the subdirectory I created under the html directory that GoDaddy created), the Apache 301 redirect worked as desired.

I know that’s a short explanation of the problem and solution, but I hope it’s helpful.

Share it!

There’s just one person behind this website; if this article was helpful (or interesting), I’d appreciate it if you’d share it. Thanks, Al.

Add new comment

The content of this field is kept private and will not be shown publicly.

Anonymous format

  • Allowed HTML tags: <em> <strong> <cite> <code> <ul type> <ol start type> <li> <pre>
  • Lines and paragraphs break automatically.
By submitting this form, you accept the Mollom privacy policy.