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 have a domain and domain has no SSL. Also there is folder "test" under the public_html. ( So I want to redirect all requests to to .

So Please let me know the rule which i need to add on htaccess file.

Thanks is advance.

share|improve this question

Something like this i guess:

Options +FollowSymlinks
RewriteEngine on
RewriteCond %{SERVER_PORT} ^443$
RewriteRule ^(.*)$$1 [R=301,L]
share|improve this answer
Rather check %{HTTPS} ^on$ – mgorven Feb 28 '13 at 0:54

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.