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

Re: [cobalt-users] HTTP Header Info



Cody Watkins <codyw@xxxxxxxxxxxxxxxxx> writes:

> the Apache server on the raqs sends out? I am using it in a cgi-script
> and I need to be able to remove the www. if it is present. So the
> So is there a filter command I can use to remove the www. if it is
> present in a certain variable?

It depends on, which programming language you are using.

If you're using Perl, you can get by with something like:

        ($varname) = $varname =~ /^(?:www\.)?(.*)$/;

And yes, I deliberately choose a cryptic solution :-) (TIMTOWTDI)


-- 
Jens Kristian Søgaard, Mermaid Consulting I/S,
jens@xxxxxxxxxxxxxxxxxxxx,
http://www.mermaidconsulting.com/