Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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

Currently the coder has the following line in the .htaccess file:

RewriteRule ^registration$ registration.php

I understand what this means.

However I also want to redirect to

Anybody know how I could achieve this? I do not want any other pages in the app to go to https://...

Regards, Fiona

share|improve this question
up vote 3 down vote accepted

You need to ensure that the traffic is not already coming in via HTTPS before your perform the rewrite otherwise you could end up with an infinite rewrite loop.

Assuming Apache 2.0 and above:

RewriteCond HTTPS off
RewriteRule ^/registration$
share|improve this answer
Thanks DaveG. Thats great. – Fiona Feb 17 '10 at 9:18
ok.. so that worked for me. However on successful registration the user I want the user to be transferred to: I think because of the jump from https to http - its not finding the page and is just reloading registration.php. Any ideas? (It was working pre messing with .htaccess file) Fiona – Fiona Feb 17 '10 at 10:40


RewriteRule ^/registration$
share|improve this answer
Thanks Dominik. Now it just looks so simple! Thanks again. – Fiona Feb 17 '10 at 9:18

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.