[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [cobalt-users] Tricky alias redirection



-----Original Message-----
From: Jolley, Carl [mailto:Carl.Jolley@xxxxxxx]

-----Original Message-----
From: Roy A. Urick [mailto:rurick@xxxxxxxxxxxxxxxx]


If the the reference to short.com is a single URL, i.e. http://www.short.com
you should be able to come up with a rewrite rule that will send such
requests to a cgi-script on the www.long.com virtual host. With the cgi
script
you can then do all the counting you like before you issue a redirect to
www.long.com/index.html. If the requirement to count the references to
short.com was absent you could "redirect" referneces to short.com to
long.com
with a DNS CNAME record. I know that everyone says you should aways use A
records
but for this purpiose a CNAME does work and requires no changes to the
httpd.conf
file.

_____________________________________


Tricky NO MORE.

Here is a Perl Script to do it
#!/usr/bin/perl

$_ = $ENV{SCRIPT_URI};

if (/long/)
{
        print "Location: http://www.long.com\n\n";;   
}
else
{   
        print "Location: http://www.long.com/index2.html\n\n";;
}

Have fun ... it works, I tried it with my domain name ... I can not say if
it will work for you.  But I am sure with some tinkering, you will be able
to get it to work!

Enjoy,

Brian Smith 
CCNA, NCSA
Network Support Engineer
SOLUSERVE
       www.solunet.com
1571 Robert J. Conlan Blvd., Suite 110
Palm Bay, FL  32905
(888)449-5766
fax: (321)-676-1287