getting the virtual host info... 
Author Message
 getting the virtual host info...

I am writing a script to do some form processing, and when complete, I
am trying to display a 'thank you' html page.  The problem is I want the
code to work in both our test or staging environment as well as our
production environment.

I am using the following:
print $q->redirect($q->protocol() . '://' . $q->virtual_host() .
$done_url);

however, $q->virtual_host() gives the same value (www.xxx.com)
regardless of whether I am running it from http://www.*-*-*.com/   or
http://www.*-*-*.com/ :81 (our staging server).

Am I doing this correctly, or is there a better way?

Thanks!



Sun, 30 Dec 2001 03:00:00 GMT  
 getting the virtual host info...

Quote:

>I am writing a script to do some form processing, and when complete, I
>am trying to display a 'thank you' html page.  The problem is I want the
>code to work in both our test or staging environment as well as our
>production environment.

>I am using the following:
>print $q->redirect($q->protocol() . '://' . $q->virtual_host() .
>$done_url);

>however, $q->virtual_host() gives the same value (www.xxx.com)
>regardless of whether I am running it from http://www.xxx.com   or
>http://www.xxx.com:81 (our staging server).

the host is the same, so it should return the same host each time.

you'll have to add port information - $ENV{SERVER_PORT} or whatever
your server does with that info.

--
brian d foy                    
CGI Meta FAQ <URL:http://www.smithrenaud.com/public/CGI_MetaFAQ.html>
Perl Monger Hats! <URL:http://www.pm.org/clothing.shtml>



Sun, 30 Dec 2001 03:00:00 GMT  
 getting the virtual host info...
thanks!  that did it.
Quote:

> the host is the same, so it should return the same host each time.

> you'll have to add port information - $ENV{SERVER_PORT} or whatever
> your server does with that info.



Sun, 30 Dec 2001 03:00:00 GMT  
 getting the virtual host info...

<URL::">
&& I am writing a script to do some form processing, and when complete, I
&& am trying to display a 'thank you' html page.  The problem is I want the
&& code to work in both our test or staging environment as well as our
&& production environment.

That's a problem? In our company, code that works in test, stage and
production is a _requirement_, not a problem.

&& I am using the following:
&& print $q->redirect($q->protocol() . '://' . $q->virtual_host() .
&& $done_url);
&&
&& however, $q->virtual_host() gives the same value (www.xxx.com)
&& regardless of whether I am running it from http://www.xxx.com   or
&& http://www.xxx.com:81 (our staging server).

But, but, but, the other x is different!  Why do you expect 'www.xxx.com'
and 'www.xxx.com' to be different?

&& Am I doing this correctly, or is there a better way?

I don't see a problem, except that this is better asked in a different
group.

Abigail
--
perl5.004 -wMMath::BigInt -e'$^V=Math::BigInt->new(qq]$^F$^W783$[$%9889$^F47]
.qq]$|88768$^W596577669$%$^W5$^F3364$[$^W$^F$|838747$[8889739$%$|$^F673$%$^W]
^V
%$^U;$^V/=$^U}while$^V!=$^W'

  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----



Mon, 31 Dec 2001 03:00:00 GMT  
 getting the virtual host info...

Quote:

> But, but, but, the other x is different!  Why do you expect 'www.xxx.com'
> and 'www.xxx.com' to be different?

> I don't see a problem, except that this is better asked in a different
> group.

The problem has been solved by a previous poster.. who suggested getting the port
using the environment variable  $ENV{SERVER_PORT}


Fri, 04 Jan 2002 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Getting mod_perl working under mod_ssl virtual host

2. getting the real virtual host

3. To all Virtual Hosting Company (URGENT HOST WANTED)

4. Getting Connecting Host Info from inetd

5. Host your WEB DESIGNS and organize WEB OFFICES with our Virtual Servers

6. mod_perl, apache, virtual host problem

7. McGraw-Hill Education Examines Career Readiness Issues, Hosts 21st Century Workforce Virtual Conference

8. perl virtual hosts

9. Log rotator script for virtual hosting

10. mod_perl virtual web hosting?

11. Config module and virtual hosts

12. mod_perl, apache, virtual host problem

 

 
Powered by phpBB® Forum Software