Surf 11 » Godaddy Hosting mod_rewrite with .htaccess Files

Finding the best waves on the web.

I have been testing out the Linux ColdFusion hosting on Godaddy. One thing I use a lot however is mod_rewrite, but I've been having some issues so far. Here are some tips that I've found so far about this

  • Changes to the .htaccess file may take up to one hour before you will see them.
  • Make sure you have added RewriteEngine on to your .htaccess
  • Another blogger has pointed out that URL's that have .php are processed before mod_rewrite (so your rules may not work on those urls).
  • It looks like you may need to add Options +FollowSymLinks to your .htaccess file.
  • Make sure you have spelled htaccess correctly, two c's and two s's
  • You might require a / in the second part of your RewriteRule.

Here's an example .htaccess file for mod_rewrite on Godaddy:

Options +FollowSymLinks
RewriteEngine on
RewriteRule ^/foo /test.cfm?path=foo


Related Entries
On at galimatias wrote:
1
Thank you for the information. This people in GoDaddy sometimes seems like they hate their customers. Not allowing the 301 redirects by GoDaddy is just crazy. Greetings from Spain!

On at Francisco L wrote:
2
Best Hosting? No... The worst website hosting is Godaddy. Their hosting services are the complete opposite of their registrar services. They have very unusual restrictions in plans (like a limit of 1000 e-mails sent per day in a DEDICATED SERVER, lol). These restrictions are hidden in it's "sales technics". The support is very slow, take more than 24 hours to answer questions. No guarantee, no refundable, no respect, no shame to provice a deficient service. They win money with it's hosting services lying to customers. It's probabbly an outsourced service. Terrible. Flee from its host services!!

On at 0w3w wrote:
3
I'm not native speaker, sorry for the grammar..

Well, I had the same problem u have, and after some googling I found the answer it is as simple as one instruction on the .htaccess:

Options -MultiViews

This is the .htaccess that worked for me:

Options +FollowSymLinks Options -MultiViews rewriteEngine On rewriteRule ^test/(.*)\.php$ /test.php?variable=$1

If this do not work or your hosting is in the root directory try taking out the / on the second part of the rewrite rule, like this

rewriteRule ^test/(.*)\.php$ test.php?variable=$1

Hope I'd helped ^^

Name:

Email: (optional, not displayed on site)
   Subscribe to this thread
Comments: (html will be escaped)



Subscribe to our RSS Feed: subscribe to this feed XML
Archives   Tags   Contact