Mike L. Mike L. - 1 year ago 103
Apache Configuration Question

Quick mod_rewrite help on GoDaddy

This htaccess works fine locally, but on GoDaddy the URL isn't caught by the rewrite engine.

RewriteEngine on

RewriteRule ^products/amsoil/(.*)/$ /products.php?amsoil=$1 [L]
RewriteCond %{HTTP_HOST} ^somedomain.com
RewriteRule (.*) http://www.somedomain.com/$1 [R=301,L]

This worked until a few days ago. Basically
should forward to
....did work, and still works locally however now I just get a 404 error on

Any ideas?

Answer Source

I verified that the following script works on our current hosting plans:

RewriteEngine on rewritecond %{http_host} ^coolexample.com [nc] rewriterule ^(.*)$ http://www.coolexample.com/$1 [r=301,nc]

There is a possibility that you are on an older version of our hosting plans. If that is the case, you may want to consider upgrading. Check out http://x.co/Zecq for a how-to on upgrading. There is also a link to the 4GH FAQ. Please review that before upgrading to avoid unwanted surprises.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download