Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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 / http://mysite.com and Redirect * mysite.com (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

1 Answer 1

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 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 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

 
discard

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.