CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
Search Posts SEARCH
Who's Online WHO'S
Log in LOG

Home: Perl Programming Help: Beginner:
Cobalt Enviroment Variables



Mar 15, 2001, 3:37 AM

Post #1 of 2 (733 views)
Cobalt Enviroment Variables Can't Post

Would any one know what $ENV Variable will
get the subdomain if wildcards are tured on?

it should be REDIRECT_URL or HTTP_HOST but
REDIRECT_URL is not working on this server
it prints out the current document name not
where it came from - this messes with the
ERROR script and the redirect service I'm trying
to get going.

I read someplace last year that Cobalt servers
don't use some perl Variables or have alternative
Variables in there place - what would be the right
name for REDIRECT_URL veriables on a cobalt server??

here is some info on the server:
Server Info

this redirect should work but don't:



Mar 22, 2001, 12:14 PM

Post #2 of 2 (720 views)
Re: Cobalt Enviroment Variables [In reply to] Can't Post

I believe you want HTTP_HOST, this will have the requested hostname from the URL.

How ever cobalt has a weird rewrite setup in apache where if the hostname is not matched to what you set it up as then it will redirect to the correct hostname.

e.g. you view or

the cobalt RAQ will redirect to

You will need to remove the rewrite for the domain from the /etc/httpd/conf/httpd.conf file first.

You can use something like the following to show you all $ENV vars.

print "Content-type: text/html\n\n";
foreach $key(keys %ENV) {
print "$key: $ENV{$key}


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives