We help IT Professionals succeed at work.

mod rewrite EASY 500 POINTS URGENT!

TheMaximumWeasel
on
Medium Priority
205 Views
Last Modified: 2010-03-04
I have made a virtual host so if someone accesses example.com with https:// it uses this virtualhost. How can I use mod_rewrite so in this virtual host it automatically changes to http:// but keeps everything else so if it is https://www.example.com/test.php?id=6 it will change it to http://www.example.com/test.php?id=6

Max
Comment
Watch Question

Top Expert 2008
Commented:
in your virtual host:

RewriteEngine on
RewriteRule ^/(.*) http://host/$1 [R=301,L]

or with mod_alias:

Redirect 301 / http://host/

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts

Author

Commented:
do I have to change host to my domain???

Max
Top Expert 2008

Commented:
Yes.
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.