Forum Moderators: phranque

Message Too Old, No Replies

Two Similar Mod Rewrites Behave Differently

         

moheybee

3:47 am on Jan 5, 2005 (gmt 0)

10+ Year Member



RewriteCond %{HTTP_HOST} ^ads\.domain1\.com$
RewriteRule ^/$ [domain1.com...] [R,L]

RewriteCond %{HTTP_HOST} ^ads\.domain2\.com$
RewriteRule ^/$ [secure.domain2.com...] [R,L]

The first rewrite performs flawlessly.

The second one forwards to [secure.domain2.com...] not [secure.domain2.com...]

I can't see why this is happening.

jdMorgan

4:17 am on Jan 5, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Is your server set up to accept secure connections on ports other than 443?

If not, try:


RewriteCond %{HTTP_HOST} ^ads\.domain2\.com$
RewriteRule ^/$ https://secure.domain2.com:443/aas/ [R,L]

I don't know that this will help, but at the very least, it'll yield a bit more information.

Jim

moheybee

5:31 am on Jan 6, 2005 (gmt 0)

10+ Year Member



Thanks for your help Jim.

The secure server accepts connections only on port 443.

I tried your idea of adding the port in and it didn't seem to do anything.

When I curl the url ads.domain2.com, this is the output I get (both with and without your fix):

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML><HEAD>
<TITLE>302 Found</TITLE>
</HEAD><BODY>
<H1>Found</H1>
The document has moved <A HREF="https://secure.domain2.com/">here</A>.<P>
<HR>
<ADDRESS>Apache/1.3.33 Server at secure.domain2.com Port 80</ADDRESS>
</BODY></HTML>

I don't see why it is not including the "/aas/".

moheybee

5:44 am on Jan 6, 2005 (gmt 0)

10+ Year Member



Could the problem be that [secure.domain2.com...] is on a different physical server?

moheybee

5:55 am on Jan 6, 2005 (gmt 0)

10+ Year Member



GAR! It was a DNS issue.

I apologize for wasting your time.