Web Server forum
Back To The Forum Home!Search!Private Messaging System

This is Interesting: Free IT Magazines Now Free shipping to California  
Web Server Talk Web Server Talk > Web Servers reviews > Apache Server configuration support > url redirect in Apache




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

Tolstrup is offline     url redirect in Apache  
Tolstrup


View Ip Address Report This Message To A Moderator Edit/Delete Message


Click Here to See the Profile for Tolstrup Click here to Send Tolstrup a Private Message Find more posts by Tolstrup Add Tolstrup to your buddy list
 
06-03-04 09:24 PM

Hi there

I have a problem when trying to redirect an URL. So please help me if you ca
n, because I am going crazy on this....  

The platform is an IBM Apache HTTP Server V. 1.3 and an IBM Application Serv
er V. 4.x running a Devine solution.

Now my problem is that we have two URL's how should be showing the same site
. 

Exampel:
We have already a site called www.a-a.com. But now we have included the URL www.aa
.com to oure litle firm. So now we would like the two URL's to point to the 
same instance of the WAS.

I am already having this listed in my httpd.conf file:

<VirtualHost 192.168.3.10>
DocumentRoot .../site
ServerName www.a-a.com
CustomLog "| ......
..
..
</VirtualHost>
And that work fine - we can see the site and so on.

Now I have tryed doing like this/adding this to the httpd.conf file:
<VirtualHost 192.168.3.10>
DocumentRoot .../site
ServerName aa.com
ServerAlias www.aa.com a-a.com www.a-a.com
</VirtualHost>

The total is now:

<VirtualHost 192.168.3.10>
DocumentRoot .../site
ServerName www.a-a.com
CustomLog "| ......
..
..
</VirtualHost>

<VirtualHost 192.168.3.10>
DocumentRoot .../site
ServerName aa.com
ServerAlias www.aa.com a-a.com www.a-a.com
</VirtualHost>

But this does not work !??? I can reach the default errorpage of the HTTP-se
rver - but not get into the WAS or even the requested(redirected URL).

There is a DNS server in oure enviroment, so we do not have to change any wi
ndows HOSTS files.

I hope someone can help - and understand my english  

Regards
Brian Tolstrup




[ Post a follow-up to this message ]



    Re: url redirect in Apache  
Davide Bianchi


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
06-04-04 07:49 AM

Tolstrup <Tolstrup.17aoaz@mail.webservertalk.com> wrote:
> We have already a site called www.a-a.com. But now we have included the
> URL www.aa.com to oure litle firm. So now we would like the two URL's
> to point to the same instance of the WAS.

If you already have a VirtualHost, use the ServerAlias directive to
have both URL handled by the same VHost.

Davide

--
| A language that doesn't have everything is actually easier to program
| in than some that do. -- Dennis M. Ritchie
|
|





[ Post a follow-up to this message ]



Tolstrup is offline       
Tolstrup


View Ip Address Report This Message To A Moderator Edit/Delete Message


Click Here to See the Profile for Tolstrup Click here to Send Tolstrup a Private Message Find more posts by Tolstrup Add Tolstrup to your buddy list
 
06-04-04 09:55 AM

Hi Davide

Do you mean something like this:

<VirtualHost 192.168.3.10>
DocumentRoot .../site
ServerName www.a-a.com
ServerAlias www.aa.com a-a.com www.a-a.com
CustomLog "| ......
..
..
</VirtualHost>

or how do I do what you surgest??

Regards

Brian Tolstrup




[ Post a follow-up to this message ]



    Re: url redirect in Apache  
Davide Bianchi


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
06-04-04 03:49 PM

Tolstrup <Tolstrup.17btyz@mail.webservertalk.com> wrote:
> Do you mean something like this:

Yes, exactly.
Davide

--
| Grabel's Law: 2 is not equal to 3 -- not even for large values of 2.
|
|
|





[ Post a follow-up to this message ]



Tolstrup is offline       
Tolstrup


View Ip Address Report This Message To A Moderator Edit/Delete Message


Click Here to See the Profile for Tolstrup Click here to Send Tolstrup a Private Message Find more posts by Tolstrup Add Tolstrup to your buddy list
 
06-04-04 07:02 PM

Hi Davide

I have tryed this:

<VirtualHost 192.168.3.10>
DocumentRoot .../site
ServerName www.a-a.com
ServerAlias www.aa.com a-a.com www.a-a.com
CustomLog "| ......
...
...
</VirtualHost>

as you so kind surgested.

But it does not work. I still get the default errorpage from the HTTP-server, and the u
rl is still www.aa.com.

Please advise on what to do...

Regards
brian Tolstrup




[ Post a follow-up to this message ]



    Re: url redirect in Apache  
HansH


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
06-05-04 04:49 AM

"Tolstrup" <Tolstrup.17ciz0@mail.webservertalk.com> schreef in bericht
news:Tolstrup.17ciz0@mail.webservertalk.com...
> <VirtualHost 192.168.3.10>
> DocumentRoot .../site
> ServerName www.a-a.com
> ServerAlias www.aa.com a-a.com www.a-a.com
> CustomLog "| ......
> ...
> ...
> </VirtualHost>
http://httpd.apache.org/docs-2.0/mo...tml#serveralias
"The ServerAlias directive sets the alternate names for a host, for use with
/name-base virtual hosts/"

I'ld prefer to redirect these aliasses to the true domain; at least safes
you from (failing) cross-domain cookies.

HansH







[ Post a follow-up to this message ]



Tolstrup is offline       
Tolstrup


View Ip Address Report This Message To A Moderator Edit/Delete Message


Click Here to See the Profile for Tolstrup Click here to Send Tolstrup a Private Message Find more posts by Tolstrup Add Tolstrup to your buddy list
 
06-07-04 05:25 PM

Hi HansH

The true domain is www.a-a.com. All I want is to get the same server to redirect to thi
s host, when someone types in the URL  www.aa.com.

My DNS is forwarding to the rigth Apache. because I get the HTTP Servers default page f
or error 404 when trying the URL www.aa.com.

I have been reading at www.apache.org but do not seam abel to get it to work
 proberly.

So if you do have a way of doing it, I will be thankfull for that.

Regards 

Brian




[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 03:47 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register