Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to use a .htaccess file to redirect everything from https to normal http (for reasons beyond the scope of this post).

I have tried playing the .htaccess file in the /httpdocs directory with the content

Redirect / and Redirect * (the http:// should be there, but I cannot post it because "new users are limited to posting one link")

but neither of those has worked.

What am I doing wrong?

If it is helpful, I am on CentOS on a normal LAMP stack.

share|improve this question
up vote 1 down vote accepted

Give this a try:

RewriteEngine On
RewriteCond %{HTTPS} on
RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
share|improve this answer
Where should this be placed? In /httpsdocs directory or the root directory of the site or what? I have it in the /httpsdocs and it doesn't appear to be working. – Oren Hizkiya Aug 20 '10 at 19:55
My bad, just edited it. It should go in your root directory of your site. Try the updated code. – vmfarms Aug 20 '10 at 19:57
Perfect. Much thanks. – Oren Hizkiya Aug 20 '10 at 20:02
Also, make sure you don't have AllowOverride None specified in your VHost. – vmfarms Aug 20 '10 at 20:02

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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