httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Blake McBride <blake1...@gmail.com>
Subject [users@httpd] Problem with Redirect
Date Sat, 08 Jul 2017 13:35:00 GMT
Hello,

I am using Apache 2.4.18 on a 64 bit Linux box.  I am serving several
different URL's via VirtualHost.  All is working well except a single,
unique case.   In the case with the problem, I am attempting to redirect a
URL to an external URL.  All the cases that work, I am hosting the site,
but not in this one case.

Naturally, I own the domain name.  The DNS points to my server, but I want
it redirected to a site I pay for but isn't hosted by my machine.  Under
/etc/apache2/sites-enabled, I have:

<VirtualHost *:80>
ServerName abc.com
ServerAlias *.abc.com
ServerAdmin me@xyz.com
Redirect / https://www.def.com/ghi#about
</VirtualHost>

Let's say the main URL for my machine is jkl.com.  Now, when I go to abc.com
it ends up at jkl.com !!

Whenever I change the apache2 settings, I do:  apache2ctl restart

When, through my browser, I go to abc.com, I see the following under
/var/log/other_vhosts_access.log:

jkl.com:80 174.195.128.13 - - [08/Jul/2017:13:31:07 +0000] "GET / HTTP/1.1"
200 2846 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML,
like Gecko) Chrome/59.0.3071.115 Safari/537.36"

How the heck is access to abc.com showing as jkl.com?  How can I make
abc.com redirect to the external server at URL https://www.def.com/ghi#about
?

Thanks so much for help!

Blake McBride

Mime
View raw message