I am trying to use a 301 redirect to direct users and bots to my new site but when I put the .htaccess live I keep getting a 500 internal error shown.

The site is actually a subdomain which i want to redirect to another subdomain on another site. I'm not sure if that's relevant but I thought I should include this information.

The web server I'm using is Apache and this is the htaccess code I'm using:

Options +FollowSymLinks
RewriteEngine on
RewriteRule (.*) http://www.blog.example.co.uk/$1 [R=301,L]

Any idea what might be wrong with this?

2 Answers 2


Not guaranteed this is it, but try removing a line at a time until the error stops. That'll help you see which particular bit is causing the problem.
Getting a 500 from htaccess is sometimes a sign you're trying to do something you're not allowed to. Is mod_rewrite actually enabled, for example? The same for the Options line; If the server isn't configured with AllowOverride Options then it might be the FollowSymLinks line.


not sure why it wasnt working but got in contact with the host and this is the solution they provided.. put it in the httpdocs folder, works fine

Redirect 301 / http://blog.example.co.uk 
  • 1
    Redirect is in mod_alias, whereas RewriteRule is in mod_rewrite, so maybe mod_rewrite wasn't enabled - as Su' suggested? But you are also redirecting to a different URL than in your rewrite example above.
    – MrWhite
    Commented Jul 4, 2012 at 13:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.