[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cobalt-users] Tricky alias redirection
- Subject: Re: [cobalt-users] Tricky alias redirection
- From: "Roy A. Urick" <rurick@xxxxxxxxxxxxxxxx>
- Date: Fri Aug 16 09:49:01 2002
- List-id: Mailing list for users to share thoughts on Sun Cobalt products. <cobalt-users.list.cobalt.com>
I think my best solution is going to be a mod_rewrite in a .htaccess file
within the long.com directory. Just gotta figure it out...
That seems to me to be the easiest to move to another hosting provider
if/when needed.
----- Original Message -----
From: <BSmith@xxxxxxxxxxx>
To: <cobalt-users@xxxxxxxxxxxxxxx>
Sent: Friday, August 16, 2002 11:30 AM
Subject: 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
>
> _____________________________________
> cobalt-users mailing list
> cobalt-users@xxxxxxxxxxxxxxx
> To subscribe/unsubscribe, or to SEARCH THE ARCHIVES, go to:
> http://list.cobalt.com/mailman/listinfo/cobalt-users
>