user2630791 user2630791 - 9 months ago 47
Apache Configuration Question

GoDaddy Apache 2.4 - 301 htacces Redirect

I had a perfectly working site before they update the servers, now I can't get redirects working?

That's what I had before:

RewriteEngine On
rewritecond %{http_host} ^ [nc]<br/>
rewriterule ^(.*)$$1 [r=301,nc]<br/>
redirect 301 "contact.html"<br/>

Please help!


You have HTML tags in the example you're showing. Also you're surrounding things with non-necessary quotes. This now uses mod_rewrite exclusively.

RewriteEngine On
RewriteRule ^contact.html [R=301,L]

RewriteCond %{HTTP_HOST} ^ [NC]
RewriteRule ^(.*)$$1 [R=301,NC,L]

Remember that since GoDaddy is the host, they will have directives in their httpd.conf file that are processed as well as any configurations you add in the .htaccess file.

If for some reason this doesn't work, additionally Godaddy has their own support forums for dealing with issues in configuration of their services.