logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Mod rewrite condition creates infiitinte redirect loop
Author
aarelovich



Joined: 29 Nov 2016
Posts: 1

PostPosted: Tue 29 Nov '16 14:28    Post subject: Mod rewrite condition creates infiitinte redirect loop Reply with quote

I'm configuring an apache web server which is reached by the address http://register.conference.com. However I want to be able to redirect that to http://register.conference.com/registration

The way, I understand that I need to do this is with a RewriteCond followed by a RewriteRule.

This is what I've written.

Code:
RewriteCond %{HTTP_HOST} ^register.conference.com$
RewriteRule . http://register.conference.com/registration


This creates an infinite loop of redirections. But I don't know how to break it, because the redirection address is part of the RewriteCond. So how do I fix this?

Thanks for any help.
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7402
Location: EU, Germany, Next to Hamburg

PostPosted: Tue 29 Nov '16 15:59    Post subject: Reply with quote

Add a second condition

Code:
RewriteCond %{HTTP_HOST} ^register.conference.com$
RewriteCond %{REQUEST_URI} !=/registration
RewriteRule . http://register.conference.com/registration
Back to top


Reply to topic   Topic: Mod rewrite condition creates infiitinte redirect loop View previous topic :: View next topic
Post new topic   Forum Index -> Apache