0

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.

1

Give this a try:

RewriteEngine On
RewriteCond %{HTTPS} on
RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
  • 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
  • Also, make sure you don't have AllowOverride None specified in your VHost. – vmfarms Aug 20 '10 at 20:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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