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.

link|improve this question

75% accept rate
feedback

1 Answer

up vote 1 down vote accepted

Give this a try:

RewriteEngine On
RewriteCond %{HTTPS} on
RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
link|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
feedback

Your Answer

 
or
required, but never shown

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