Hi,
I am very new to .htaccess and only know some basics. What I am trying to do is that if I receive the request [
hello.mydomain.com...] I redirect to [
hello.mydomain.com...]
I am using the following rules and conditions in my .htaccess file;
RewriteCond %{HTTP_HOST} ^hello\.(.+)$ [NC]
RewriteCond %{REQUEST_URI} !^/welcome/ [NC]
RewriteRule ^(.*)$ http://hello.mydomain.org/welcome/ [R,L]
The first condition is to test if subdomain is "hello". The second condition is to test if /welcome/ is already in the request uri. The last condition is to redirect [
hello.mydomain.com...] to [
hello.mydomain.com...] (if the first two conditions are met).
However my browser is telling me that it "detected that the server is redirecting the request for this address in a way that will never complete". I can't understand why. However by monitoring the http request done by the browser I noticed that after the first request [
hello.mydomain.com...] the browser redirects to [
hello.mydomain.com...] and then continues doing like that until "max" value in the http header reaches 59.
Does anyone know what I might be doing wrong?