0

I'm a newbie at this server stuff so please be patient. What I want to do is very simple. I have the following subdomain that points to my server http://register.example.com (this is a dummy, not a real link). However this points to my server and I'd like it to redirect to http://register.example.com/registration. In order to do this I'm modifying the virtual host configuration for my server with the following lines:

    RewriteEngine On
    # This will enable the Rewrite capabilities

    RewriteCond %{HTTP_HOST} ^register.example.com$
    RewriteRule /(.*) http://register.example.com/registration  [R,L]

When doing this I get the following error fromo both Firefox and chrome:

Firefox has detected that the server is redirecting the request for this address in a way that will never complete.

Can anyone tell me what I'm doing wrong and how to fix it?

EDIT:

I saw my infinite mistake loop. But my problem is still not solved. I still need to send http://register.conference.com/ to http://register.conference.com/registration and I have not I idea how to do it as everything that I have tried has either failed or simply done nothing.

Here is my lastest attempt (which does nothing)

RewriteRule ^http://register.conference.com$ http://register.conference.com/lascas  [R,L]

I've read the supposed post with the duplicate answers but I still don't see a way to do what I need.

aarelovich
  • 141
  • 8
  • You have created an infinite loop. When someone tries to access `http://register.example.com/registration`, they will match the `RewriteCond` and again get redirected to `http://register.example.com/registration`. – Jenny D Nov 29 '16 at 11:22
  • I see. However I have read your link and I still don't see how I can do what I want. Whatever I try to do either it does absolutely nothing or it simply fails to load (like above). Could please provide an example similar to what I want to do? – aarelovich Nov 29 '16 at 11:31
  • I'm afraid you need to read the link a bit closer. It has an explanation of the syntax of rewrite rules, which you need to understand in order to solve your problem. It also tells you how to setup debugging, which also comes in handy. As a systems administrator, these are things you need to be familiar with. – Jenny D Nov 29 '16 at 11:41
  • I'm not a system administrator. I need to solve this specific problem fast and I'm never touching a web server again. Which is why I'm trying to get help. I've been stuck on this problem for over day reading documentation, regexps and whatnot and I can't seem to solve something that I'm sure someone who knows can write a two second line and just help me. Which is why I was asking. – aarelovich Nov 29 '16 at 11:57

0 Answers0