Re: [PHP] www. not working

2008-02-21 Thread Børge Holen
On Thursday 21 February 2008 13:41:20 Jason Pruim wrote:
> On Feb 21, 2008, at 5:13 AM, Richard Heyes wrote:
>  Spider webs have existed for many a year...
> >>
> >>Not long before the eggs hatched.
> >
> > Debatable.
>
> Are we about to go into another chicken/egg then? Or in this case,
> spider porn/egg

this bestiality shouldn't even exist as a topic

>
> --
>
> Jason Pruim
> Raoset Inc.
> Technology Manager
> MQC Specialist
> 3251 132nd ave
> Holland, MI, 49424
> www.raoset.com
> [EMAIL PROTECTED]



-- 
---
Børge Holen
http://www.arivene.net

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] www. not working

2008-02-21 Thread Jason Pruim


On Feb 21, 2008, at 5:13 AM, Richard Heyes wrote:


Spider webs have existed for many a year...

   Not long before the eggs hatched.



Debatable.


Are we about to go into another chicken/egg then? Or in this case,  
spider porn/egg


--

Jason Pruim
Raoset Inc.
Technology Manager
MQC Specialist
3251 132nd ave
Holland, MI, 49424
www.raoset.com
[EMAIL PROTECTED]

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] www. not working

2008-02-21 Thread HostWare Kft.


"A form" of the web existing long before that depending on your 
definition of the web. To me it's a way for people to share 
information. That would cover the BBS world which pre-dates LANs by 
some distance.


Spider webs have existed for many a year...


Yeah, but when was the last time you saw porn on one of them?!!


Do you know Black Widow? :-)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] www. not working

2008-02-21 Thread Richard Heyes

Spider webs have existed for many a year...


Not long before the eggs hatched.



Debatable.

--
Richard Heyes
http://www.websupportsolutions.co.uk

Knowledge Base and Helpdesk software hosted for you - no
installation, no maintenance, new features automatic and free

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] www. not working

2008-02-21 Thread Richard Heyes
"A form" of the web existing long before that depending on your 
definition of the web. To me it's a way for people to share 
information. That would cover the BBS world which pre-dates LANs by 
some distance.


Spider webs have existed for many a year...


Yeah, but when was the last time you saw porn on one of them?!!


Now that would be telling. :-)

--
Richard Heyes
http://www.websupportsolutions.co.uk

Knowledge Base and Helpdesk software hosted for you - no
installation, no maintenance, new features automatic and free

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] www. not working

2008-02-20 Thread Robert Cummings

On Wed, 2008-02-20 at 17:07 +, Stut wrote:
> Richard Heyes wrote:
> >> "A form" of the web existing long before that depending on your 
> >> definition of the web. To me it's a way for people to share 
> >> information. That would cover the BBS world which pre-dates LANs by 
> >> some distance.
> > 
> > Spider webs have existed for many a year...
> 
> Yeah, but when was the last time you saw porn on one of them?!!

Well after the money shot the big one ate the little one.

Cheers,
Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] www. not working

2008-02-20 Thread Daniel Brown
On Feb 20, 2008 12:07 PM, Stut <[EMAIL PROTECTED]> wrote:
> Richard Heyes wrote:
> >> "A form" of the web existing long before that depending on your
> >> definition of the web. To me it's a way for people to share
> >> information. That would cover the BBS world which pre-dates LANs by
> >> some distance.
> >
> > Spider webs have existed for many a year...

Not long before the eggs hatched.

-- 


Daniel P. Brown
Senior Unix Geek


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] www. not working

2008-02-20 Thread Stut

Richard Heyes wrote:
"A form" of the web existing long before that depending on your 
definition of the web. To me it's a way for people to share 
information. That would cover the BBS world which pre-dates LANs by 
some distance.


Spider webs have existed for many a year...


Yeah, but when was the last time you saw porn on one of them?!!

-Stut

--
http://stut.net/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] www. not working

2008-02-20 Thread Richard Heyes
"A form" of the web existing long before that depending on your 
definition of the web. To me it's a way for people to share information. 
That would cover the BBS world which pre-dates LANs by some distance.


Spider webs have existed for many a year...

--
Richard Heyes
http://www.websupportsolutions.co.uk

Knowledge Base and Helpdesk software hosted for you - no
installation, no maintenance, new features automatic and free

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] www. not working

2008-02-20 Thread Nathan Rixham

Jason Pruim wrote:


On Feb 20, 2008, at 11:41 AM, Daniel Brown wrote:


On Feb 19, 2008 10:42 PM, Larry Garfield <[EMAIL PROTECTED]> wrote:

On Tuesday 19 February 2008, Daniel Brown wrote:

On Feb 19, 2008 4:43 AM, Christoph <[EMAIL PROTECTED]> wrote:

Don't do that.
Some sites may or may not use www. for whatever reason...
Usually screwed-up A-name records by incompetent sysadmins, but there
it is...


Really?  So

games.yahoo.com
blogreport.salon.com
mirror1.downloads.com

are examples of screwed up records by incompetent sysadmins?


   No, they're properly-configured FQDNs.  They're just irrelevant
examples to the context in which Rich was relaying to the OP.

   Picture a server where the A records or CNAMEs don't exist for the
www. alias.  Or, conversely, where the only way to access the domain
is by using the www. alias.

   Those, Christoph, are some of the things incompetent sysops do
and on a surprisingly frequent basis.


I see, so because I have garfieldtech.com and www.garfieldtech.com 
pointing to
two entirely different servers in different states because I want 
them to do

different things, I'm an incompetent sysop.  Thanks, good to know.


   Back off, Garfield, my answer couldn't cover everything!  ;-P

   Besides, without fully-quoting the rest of my message, you're
taking it all completely out of context.


DNS was used for a lot of things long before the web came around, ya 
know.


   You're full of it.  Al Gore never would've invented DNS if he
didn't have plans to let people "get on the AOL" to go to eBay.

   Jocularity aside, DNS was invented in 1983 (shortly after TCP/IP),
whereas the WorldWide Web was first "invented" in 1990.  However, if
you remember ENQUIRE (on ARPANET), which was created by Tom
Berners-Lee (I had to look up his name, I couldn't remember it), the
same guy who went on to create the Web, you may remember it existed
before DNS.  So essentially, even though it wasn't yet known as the
WorldWide Web, a form of it did exist before the Domain Name System.

   Just taking a trip down memory lane.  ;-)



I actually read about that in some history books regarding DNS... Man 
Brown... You must be old if you actually remember it rather then reading 
it! :P


"DNS" as we know it used to be done by editing the hosts file on 
individual computers. There was a central list that was published, and 
people had to redownload it to get their system to resolve the different 
and new domains.



--

Jason Pruim
Raoset Inc.
Technology Manager
MQC Specialist
3251 132nd ave
Holland, MI, 49424
www.raoset.com
[EMAIL PROTECTED]



so far off topic it's great :)

1: the garfieldtech and www. pointing to two different servers is in my 
mind perfectly logical - but also not a great practise due to this www. 
thing we all have, everybody (99.9%) "assume" domain.ext and 
www.domain.ext have the same endpoint.


2: www is rediculous and so un-needed it's unreal - every body types in 
a whole extra 3 letters (4 including the period) for no reason.


3: wants to find a way to ban www. (have done for years)

~idunno
can't wait for 14th March :D

Nath

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] www. not working

2008-02-20 Thread Daniel Brown
On Feb 20, 2008 11:47 AM, Stut <[EMAIL PROTECTED]> wrote:
> Daniel Brown wrote:
> > Jocularity aside, DNS was invented in 1983 (shortly after TCP/IP),
> > whereas the WorldWide Web was first "invented" in 1990.  However, if
>
> 1989 actually.

Without putting too much issue into semantics, it wasn't called
the "WorldWide Web" until sometime around Christmas, 1990.  There's
probably still an archived version of that first conversation on
USENET.

> > you remember ENQUIRE (on ARPANET), which was created by Tom
> > Berners-Lee (I had to look up his name, I couldn't remember it), the
>
> That would be Tim. In fact it's Sir Tim if you want to be pedantic.

I believe the word I'm looking for is "D'oh!"  And considering the
fact that I explained that I had to look his name up at that moment
makes it all the worse, so perhaps the word should be shouted at the
top of my lungs.

> > same guy who went on to create the Web, you may remember it existed
> > before DNS.  So essentially, even though it wasn't yet known as the
> > WorldWide Web, a form of it did exist before the Domain Name System.
>
> "A form" of the web existing long before that depending on your
> definition of the web. To me it's a way for people to share information.
> That would cover the BBS world which pre-dates LANs by some distance.

Again, it's all in semantics, but I completely agree.

> Anyhoo, back to work.

Yup unfortunately

-- 


Daniel P. Brown
Senior Unix Geek


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] www. not working

2008-02-20 Thread Jason Pruim


On Feb 20, 2008, at 11:41 AM, Daniel Brown wrote:

On Feb 19, 2008 10:42 PM, Larry Garfield <[EMAIL PROTECTED]>  
wrote:

On Tuesday 19 February 2008, Daniel Brown wrote:
On Feb 19, 2008 4:43 AM, Christoph <[EMAIL PROTECTED]>  
wrote:

Don't do that.
Some sites may or may not use www. for whatever reason...
Usually screwed-up A-name records by incompetent sysadmins, but  
there

it is...


Really?  So

games.yahoo.com
blogreport.salon.com
mirror1.downloads.com

are examples of screwed up records by incompetent sysadmins?


   No, they're properly-configured FQDNs.  They're just irrelevant
examples to the context in which Rich was relaying to the OP.

   Picture a server where the A records or CNAMEs don't exist for  
the

www. alias.  Or, conversely, where the only way to access the domain
is by using the www. alias.

   Those, Christoph, are some of the things incompetent sysops  
do

and on a surprisingly frequent basis.


I see, so because I have garfieldtech.com and www.garfieldtech.com  
pointing to
two entirely different servers in different states because I want  
them to do

different things, I'm an incompetent sysop.  Thanks, good to know.


   Back off, Garfield, my answer couldn't cover everything!  ;-P

   Besides, without fully-quoting the rest of my message, you're
taking it all completely out of context.


DNS was used for a lot of things long before the web came around,  
ya know.


   You're full of it.  Al Gore never would've invented DNS if he
didn't have plans to let people "get on the AOL" to go to eBay.

   Jocularity aside, DNS was invented in 1983 (shortly after TCP/IP),
whereas the WorldWide Web was first "invented" in 1990.  However, if
you remember ENQUIRE (on ARPANET), which was created by Tom
Berners-Lee (I had to look up his name, I couldn't remember it), the
same guy who went on to create the Web, you may remember it existed
before DNS.  So essentially, even though it wasn't yet known as the
WorldWide Web, a form of it did exist before the Domain Name System.

   Just taking a trip down memory lane.  ;-)



I actually read about that in some history books regarding DNS... Man  
Brown... You must be old if you actually remember it rather then  
reading it! :P


"DNS" as we know it used to be done by editing the hosts file on  
individual computers. There was a central list that was published, and  
people had to redownload it to get their system to resolve the  
different and new domains.



--

Jason Pruim
Raoset Inc.
Technology Manager
MQC Specialist
3251 132nd ave
Holland, MI, 49424
www.raoset.com
[EMAIL PROTECTED]

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] www. not working

2008-02-20 Thread Stut

Daniel Brown wrote:

Jocularity aside, DNS was invented in 1983 (shortly after TCP/IP),
whereas the WorldWide Web was first "invented" in 1990.  However, if


1989 actually.


you remember ENQUIRE (on ARPANET), which was created by Tom
Berners-Lee (I had to look up his name, I couldn't remember it), the


That would be Tim. In fact it's Sir Tim if you want to be pedantic.


same guy who went on to create the Web, you may remember it existed
before DNS.  So essentially, even though it wasn't yet known as the
WorldWide Web, a form of it did exist before the Domain Name System.


"A form" of the web existing long before that depending on your 
definition of the web. To me it's a way for people to share information. 
That would cover the BBS world which pre-dates LANs by some distance.


Anyhoo, back to work.

-Stut

--
http://stut.net/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] www. not working

2008-02-20 Thread Daniel Brown
On Feb 19, 2008 10:42 PM, Larry Garfield <[EMAIL PROTECTED]> wrote:
> On Tuesday 19 February 2008, Daniel Brown wrote:
> > On Feb 19, 2008 4:43 AM, Christoph <[EMAIL PROTECTED]> wrote:
> > > > Don't do that.
> > > > Some sites may or may not use www. for whatever reason...
> > > > Usually screwed-up A-name records by incompetent sysadmins, but there
> > > > it is...
> > >
> > > Really?  So
> > >
> > > games.yahoo.com
> > > blogreport.salon.com
> > > mirror1.downloads.com
> > >
> > > are examples of screwed up records by incompetent sysadmins?
> >
> > No, they're properly-configured FQDNs.  They're just irrelevant
> > examples to the context in which Rich was relaying to the OP.
> >
> > Picture a server where the A records or CNAMEs don't exist for the
> > www. alias.  Or, conversely, where the only way to access the domain
> > is by using the www. alias.
> >
> > Those, Christoph, are some of the things incompetent sysops do
> > and on a surprisingly frequent basis.
>
> I see, so because I have garfieldtech.com and www.garfieldtech.com pointing to
> two entirely different servers in different states because I want them to do
> different things, I'm an incompetent sysop.  Thanks, good to know.

Back off, Garfield, my answer couldn't cover everything!  ;-P

Besides, without fully-quoting the rest of my message, you're
taking it all completely out of context.


> DNS was used for a lot of things long before the web came around, ya know.

You're full of it.  Al Gore never would've invented DNS if he
didn't have plans to let people "get on the AOL" to go to eBay.

Jocularity aside, DNS was invented in 1983 (shortly after TCP/IP),
whereas the WorldWide Web was first "invented" in 1990.  However, if
you remember ENQUIRE (on ARPANET), which was created by Tom
Berners-Lee (I had to look up his name, I couldn't remember it), the
same guy who went on to create the Web, you may remember it existed
before DNS.  So essentially, even though it wasn't yet known as the
WorldWide Web, a form of it did exist before the Domain Name System.

Just taking a trip down memory lane.  ;-)

-- 


Daniel P. Brown
Senior Unix Geek


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] www. not working

2008-02-19 Thread Larry Garfield
On Tuesday 19 February 2008, Daniel Brown wrote:
> On Feb 19, 2008 4:43 AM, Christoph <[EMAIL PROTECTED]> wrote:
> > > Don't do that.
> > > Some sites may or may not use www. for whatever reason...
> > > Usually screwed-up A-name records by incompetent sysadmins, but there
> > > it is...
> >
> > Really?  So
> >
> > games.yahoo.com
> > blogreport.salon.com
> > mirror1.downloads.com
> >
> > are examples of screwed up records by incompetent sysadmins?
>
> No, they're properly-configured FQDNs.  They're just irrelevant
> examples to the context in which Rich was relaying to the OP.
>
> Picture a server where the A records or CNAMEs don't exist for the
> www. alias.  Or, conversely, where the only way to access the domain
> is by using the www. alias.
>
> Those, Christoph, are some of the things incompetent sysops do
> and on a surprisingly frequent basis.

I see, so because I have garfieldtech.com and www.garfieldtech.com pointing to 
two entirely different servers in different states because I want them to do 
different things, I'm an incompetent sysop.  Thanks, good to know.  

DNS was used for a lot of things long before the web came around, ya know.

-- 
Larry Garfield  AIM: LOLG42
[EMAIL PROTECTED]   ICQ: 6817012

"If nature has made any one thing less susceptible than all others of 
exclusive property, it is the action of the thinking power called an idea, 
which an individual may exclusively possess as long as he keeps it to 
himself; but the moment it is divulged, it forces itself into the possession 
of every one, and the receiver cannot dispossess himself of it."  -- Thomas 
Jefferson

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] www. not working

2008-02-19 Thread Wolf

 Christoph <[EMAIL PROTECTED]> wrote: 
> > Don't do that.
> > Some sites may or may not use www. for whatever reason...
> > Usually screwed-up A-name records by incompetent sysadmins, but there
> > it is...
> 
> Really?  So
> 
> games.yahoo.com
> blogreport.salon.com
> mirror1.downloads.com
> 
> are examples of screwed up records by incompetent sysadmins?
> 
> thnx,
> Chris

No, these are examples of ones set up specifically for specific purposes.

Just like http://lonewolf.homelinux.net/ can actually resolve correctly when 
www is placed at the front due to my settings.

However a site like http://nc4h.org actually NEEDS to have the www in the front 
because the sysadmins haven't corrected a known issue for 3 years now.

But the point is, there are a number of sites which don't have a www in the 
front for a specific and valid reason, and other times where the sysadmins are 
just morons.

Making any site re-direct to www as a cause is just overhead not needed, either 
your site works correctly or you talk with your sysadmin about getting the 
records corrected and the server correct to respond to requests in any flavor 
for your site's specific needs.  And if you do it right, you use the server to 
mod_rewrite the url and you are golden.

Wolf

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] www. not working

2008-02-19 Thread Daniel Brown
These new kids have no respect.  ;-P


On Feb 19, 2008 2:33 PM, Richard Lynch <[EMAIL PROTECTED]> wrote:
>
>
> On Tue, February 19, 2008 3:43 am, Christoph wrote:
> >> Don't do that.
> >> Some sites may or may not use www. for whatever reason...
> >> Usually screwed-up A-name records by incompetent sysadmins, but
> >> there
> >> it is...
> >
> > Really?  So
> >
> > games.yahoo.com
> > blogreport.salon.com
> > mirror1.downloads.com
> >
> > are examples of screwed up records by incompetent sysadmins?
>
> No, those are the examples of people who did it on purpose.
>
> But there are tons of sites where www.example.com does not resolve to
> example.com, and for no good reason -- Just sheer ignorance on the
> part of whomever set up example.com
>
> These far outnumber the folks such as your example.
>
> --
> Some people have a "gift" link here.
> Know what I want?
> I want you to buy a CD from some indie artist.
> http://cdbaby.com/from/lynch
> Yeah, I get a buck. So?
>
> --
>
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>



-- 


Daniel P. Brown
Senior Unix Geek


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] www. not working

2008-02-19 Thread Richard Lynch


On Tue, February 19, 2008 3:43 am, Christoph wrote:
>> Don't do that.
>> Some sites may or may not use www. for whatever reason...
>> Usually screwed-up A-name records by incompetent sysadmins, but
>> there
>> it is...
>
> Really?  So
>
> games.yahoo.com
> blogreport.salon.com
> mirror1.downloads.com
>
> are examples of screwed up records by incompetent sysadmins?

No, those are the examples of people who did it on purpose.

But there are tons of sites where www.example.com does not resolve to
example.com, and for no good reason -- Just sheer ignorance on the
part of whomever set up example.com

These far outnumber the folks such as your example.

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/from/lynch
Yeah, I get a buck. So?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] www. not working

2008-02-19 Thread Daniel Brown
On Feb 19, 2008 4:43 AM, Christoph <[EMAIL PROTECTED]> wrote:
> > Don't do that.
> > Some sites may or may not use www. for whatever reason...
> > Usually screwed-up A-name records by incompetent sysadmins, but there
> > it is...
>
> Really?  So
>
> games.yahoo.com
> blogreport.salon.com
> mirror1.downloads.com
>
> are examples of screwed up records by incompetent sysadmins?

No, they're properly-configured FQDNs.  They're just irrelevant
examples to the context in which Rich was relaying to the OP.

Picture a server where the A records or CNAMEs don't exist for the
www. alias.  Or, conversely, where the only way to access the domain
is by using the www. alias.

Those, Christoph, are some of the things incompetent sysops do
and on a surprisingly frequent basis.

Take the website of the wonderful Commonwealth of Pennsyltucky for example:
Doesn't Work Works
-
---
dot.state.pa.us
www.dot.state.pa.us
lcb.state.pa.us
www.lcb.state.pa.us
psp.state.pa.us  www.psp.state.pa.us

-- 


Daniel P. Brown
Senior Unix Geek


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] www. not working

2008-02-19 Thread Philip Thompson

On Feb 19, 2008, at 3:43 AM, Christoph wrote:


Don't do that.
Some sites may or may not use www. for whatever reason...
Usually screwed-up A-name records by incompetent sysadmins, but there
it is...


Really?  So

games.yahoo.com
blogreport.salon.com
mirror1.downloads.com

are examples of screwed up records by incompetent sysadmins?

thnx,
Chris



I don't think he was referring to sub-domains. IMO,  
www.games.yahoo.com would be ridiculous. =D


~Philip

"Personally, most of my web applications do not have to factor 13.7  
billion years of space drift in to the calculations, so PHP's rand  
function has been great for me..." ~S. Johnson


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] www. not working

2008-02-19 Thread Børge Holen
On Tuesday 19 February 2008 10:43:04 Christoph wrote:
> > Don't do that.
> > Some sites may or may not use www. for whatever reason...
> > Usually screwed-up A-name records by incompetent sysadmins, but there
> > it is...
>
> Really?  So
>
> games.yahoo.com
> blogreport.salon.com
> mirror1.downloads.com
>
> are examples of screwed up records by incompetent sysadmins?
>
> thnx,
> Chris


nah, just word from a non literate
-- 
---
Børge Holen
http://www.arivene.net

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] www. not working

2008-02-19 Thread Christoph

Don't do that.
Some sites may or may not use www. for whatever reason...
Usually screwed-up A-name records by incompetent sysadmins, but there
it is...


Really?  So

games.yahoo.com
blogreport.salon.com
mirror1.downloads.com

are examples of screwed up records by incompetent sysadmins?

thnx,
Chris

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] www. not working

2008-02-18 Thread Richard Lynch
On Fri, February 15, 2008 2:46 pm, nihilism machine wrote:
> this still does not work, if a domain has no preceeding www. it
> redirects to http://www.www.site.com, if it has a www. it goes to
> www.www.mydomain.com
> , any ideas?

Don't do that.

Some sites may or may not use www. for whatever reason...

Usually screwed-up A-name records by incompetent sysadmins, but there
it is...

>
> 
> class URL {
>
>   // Public Variables
>   public $ServerName;
>   public $WWW;
>
>   // Public Functions
>
>   public function __construct() {
>   $this->checkWWW();
>   $this->ServerName = $_SERVER['SERVER_NAME'] .
> $_SERVER['REQUEST_URI'];
>   }
>
>   // Check if site is preceeded by 'WWW'
>   public function checkWWW() {
>   $myDomain = $_SERVER['SERVER_NAME'];
>   $FindWWW = 'www.';
>   $POS = strpos($myDomain, $FindWWW);

It won't be 1, since the http:// is in there, and even if it wasn't,
it would be 0, not 1, because PHP uses 0-based strings..

>   if ($POS === 1) {
>   $this->WWW = true;
>   } else {
>   $this->WWW = false;
>   }
>   }
>
>   // Redirect to WWW
>   public function WWWRedirect() {
>   if ($this->WWW == false) {
>   $redir = "Location: http://www."; . $this->ServerName;
>   header($redir);
>   }
>   }
>
> }
>
> $myURL = new URL();
> $myURL->WWWRedirect();
>
> ?>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/from/lynch
Yeah, I get a buck. So?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] www. not working

2008-02-16 Thread Shawn McKenzie
Nathan Rixham wrote:
> Shawn McKenzie wrote:
>> Shawn McKenzie wrote:
>>> Shawn McKenzie wrote:
 Jim Lucas wrote:
> nihilism machine wrote:
>> this still does not work, if a domain has no preceeding www. it
>> redirects to http://www.www.site.com, if it has a www. it goes to
>> www.www.mydomain.com, any ideas?
>>
> If you are running Apache, you do realize that all of this can be done
> in Apache instead of PHP right?
>
> Here is an example of what I have on my domain.
>
> 
> ServerName example.com
> ServerAlias .example.com
> ServerAlias ww.example.com
> RedirectMatch (.*) http://www.example.com$1
> 
>
>
>
> Jim Lucas
 Or in DNS zone file (assuming you have an A record for example.com):

 www.example.com. IN CNAMEexample.com.

 Many ways to skin a cat, and they are all fun!

 -Shawn
>>> Nevermind.  I guess this would already be in place or the conf,
>>> .htaccess or PHP wouldn't even be running.  :-(
>>
>> I thought about starting a new thread for every different idea that I
>> had in reply to this post.  What do y'all think?
>>
>> -Shawn
> 
> worth noting somewhere on the net, not quite sure if here is the best
> place for it to be honest.

Here is where I saw it.  Maybe you missed it?

-Shawn

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] www. not working

2008-02-16 Thread Nathan Rixham

Shawn McKenzie wrote:

Shawn McKenzie wrote:

Shawn McKenzie wrote:

Jim Lucas wrote:

nihilism machine wrote:

this still does not work, if a domain has no preceeding www. it
redirects to http://www.www.site.com, if it has a www. it goes to
www.www.mydomain.com, any ideas?


If you are running Apache, you do realize that all of this can be done
in Apache instead of PHP right?

Here is an example of what I have on my domain.


ServerName example.com
ServerAlias .example.com
ServerAlias ww.example.com
RedirectMatch (.*) http://www.example.com$1




Jim Lucas

Or in DNS zone file (assuming you have an A record for example.com):

www.example.com. IN CNAMEexample.com.

Many ways to skin a cat, and they are all fun!

-Shawn

Nevermind.  I guess this would already be in place or the conf,
.htaccess or PHP wouldn't even be running.  :-(


I thought about starting a new thread for every different idea that I
had in reply to this post.  What do y'all think?

-Shawn


worth noting somewhere on the net, not quite sure if here is the best 
place for it to be honest.


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] www. not working

2008-02-16 Thread M. Sokolewicz

Jim Lucas wrote:

Valedol wrote:
On Fri, 15 Feb 2008 23:46:57 +0300, nihilism machine 
<[EMAIL PROTECTED]> wrote:


this still does not work, if a domain has no preceeding www. it 
redirects to http://www.www.site.com, if it has a www. it goes to 
www.www.mydomain.com, any ideas?


checkWWW();
$this->ServerName = $_SERVER['SERVER_NAME'] . 
$_SERVER['REQUEST_URI'];

}
// Check if site is preceeded by 'WWW'
public function checkWWW() {
$myDomain = $_SERVER['SERVER_NAME'];
$FindWWW = 'www.';
$POS = strpos($myDomain, $FindWWW);
if ($POS === 1) {
$this->WWW = true;
} else {
$this->WWW = false;
}
}

// Redirect to WWW
public function WWWRedirect() {
if ($this->WWW == false) {
$redir = "Location: http://www."; . $this->ServerName;
header($redir);
   }
   }

}

$myURL = new URL();
$myURL->WWWRedirect();

?>



just try "if ($POS !== 0) {"



well, that said, isn't the first position in a string 0 ?

So, in the above  example the OP would need

//  This would mean that www. was found any where in the string
if ( $POS )

or
// Would mean that www. was found at the beginning of the string
if ( $POS === 0 )


Remember that in PHP land $var = 0 evaluates to FALSE. So strpos('foo', 
'f') will return 0 (first char), which in an if() expression would turn 
to false:

if(strpos('foo', 'f')) {
   echo 'f found in foo';
} else {
   echo 'f not found in foo, or maybe it is the first character; we can 
not tell';

}
That's the reason people use strpos('foo', 'f) !== false since that 
differentiates the false result (nothing found) from an integer result 
(for the position it was found on).


- Tul

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] www. not working

2008-02-16 Thread Valedol

On Sat, 16 Feb 2008 05:45:54 +0300, Jim Lucas <[EMAIL PROTECTED]> wrote:


Valedol wrote:

 just try "if ($POS !== 0) {"


well, that said, isn't the first position in a string 0 ?

So, in the above  example the OP would need

//  This would mean that www. was found any where in the string
if ( $POS )

or
// Would mean that www. was found at the beginning of the string
if ( $POS === 0 )


sorry, that was bad idea


--
-

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] www. not working

2008-02-15 Thread Shawn McKenzie
Shawn McKenzie wrote:
> Shawn McKenzie wrote:
>> Jim Lucas wrote:
>>> nihilism machine wrote:
 this still does not work, if a domain has no preceeding www. it
 redirects to http://www.www.site.com, if it has a www. it goes to
 www.www.mydomain.com, any ideas?

>>> If you are running Apache, you do realize that all of this can be done
>>> in Apache instead of PHP right?
>>>
>>> Here is an example of what I have on my domain.
>>>
>>> 
>>> ServerName example.com
>>> ServerAlias .example.com
>>> ServerAlias ww.example.com
>>> RedirectMatch (.*) http://www.example.com$1
>>> 
>>>
>>>
>>>
>>> Jim Lucas
>> Or in DNS zone file (assuming you have an A record for example.com):
>>
>> www.example.com. IN CNAMEexample.com.
>>
>> Many ways to skin a cat, and they are all fun!
>>
>> -Shawn
> Nevermind.  I guess this would already be in place or the conf,
> .htaccess or PHP wouldn't even be running.  :-(

I thought about starting a new thread for every different idea that I
had in reply to this post.  What do y'all think?

-Shawn

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] www. not working

2008-02-15 Thread Shawn McKenzie
Shawn McKenzie wrote:
> Jim Lucas wrote:
>> nihilism machine wrote:
>>> this still does not work, if a domain has no preceeding www. it
>>> redirects to http://www.www.site.com, if it has a www. it goes to
>>> www.www.mydomain.com, any ideas?
>>>
>> If you are running Apache, you do realize that all of this can be done
>> in Apache instead of PHP right?
>>
>> Here is an example of what I have on my domain.
>>
>> 
>> ServerName example.com
>> ServerAlias .example.com
>> ServerAlias ww.example.com
>> RedirectMatch (.*) http://www.example.com$1
>> 
>>
>>
>>
>> Jim Lucas
> 
> Or in DNS zone file (assuming you have an A record for example.com):
> 
> www.example.com. IN CNAMEexample.com.
> 
> Many ways to skin a cat, and they are all fun!
> 
> -Shawn
Nevermind.  I guess this would already be in place or the conf,
.htaccess or PHP wouldn't even be running.  :-(

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] www. not working

2008-02-15 Thread Shawn McKenzie
Jim Lucas wrote:
> nihilism machine wrote:
>> this still does not work, if a domain has no preceeding www. it
>> redirects to http://www.www.site.com, if it has a www. it goes to
>> www.www.mydomain.com, any ideas?
>>
> 
> If you are running Apache, you do realize that all of this can be done
> in Apache instead of PHP right?
> 
> Here is an example of what I have on my domain.
> 
> 
> ServerName example.com
> ServerAlias .example.com
> ServerAlias ww.example.com
> RedirectMatch (.*) http://www.example.com$1
> 
> 
> 
> 
> Jim Lucas

Or in DNS zone file (assuming you have an A record for example.com):

www.example.com. IN CNAMEexample.com.

Many ways to skin a cat, and they are all fun!

-Shawn

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] www. not working

2008-02-15 Thread Micky Hulse

Jim Lucas wrote:
If you are running Apache, you do realize that all of this can be done 
in Apache instead of PHP right?


.htaccess example:

# Power-up the rewrite engine:
RewriteEngine on
# Redirect all non-www traffic:
RewriteCond %{HTTP_HOST} ^mysite\.com [NC]
RewriteRule ^/?(.*)$ http://www.mysite.com/$1 [R=301,L]\

I like to always redirect to www or non-www... not both. I have read 
that this is good for SEO and/or SE's.


Cheers,
Micky

--
Wishlist: 
Switch: 
BCC?: 
My: 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] www. not working

2008-02-15 Thread Jim Lucas

nihilism machine wrote:
this still does not work, if a domain has no preceeding www. it 
redirects to http://www.www.site.com, if it has a www. it goes to 
www.www.mydomain.com, any ideas?




If you are running Apache, you do realize that all of this can be done 
in Apache instead of PHP right?


Here is an example of what I have on my domain.


ServerName example.com
ServerAlias .example.com
ServerAlias ww.example.com
RedirectMatch (.*) http://www.example.com$1




Jim Lucas

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] www. not working

2008-02-15 Thread Jim Lucas

Valedol wrote:
On Fri, 15 Feb 2008 23:46:57 +0300, nihilism machine 
<[EMAIL PROTECTED]> wrote:


this still does not work, if a domain has no preceeding www. it 
redirects to http://www.www.site.com, if it has a www. it goes to 
www.www.mydomain.com, any ideas?



// Public Functions

public function __construct() {

$this->checkWWW();
$this->ServerName = $_SERVER['SERVER_NAME'] . 
$_SERVER['REQUEST_URI'];

}

// Check if site is preceeded by 'WWW'

public function checkWWW() {
$myDomain = $_SERVER['SERVER_NAME'];
$FindWWW = 'www.';
$POS = strpos($myDomain, $FindWWW);
if ($POS === 1) {
$this->WWW = true;
} else {
$this->WWW = false;
}
}

// Redirect to WWW
public function WWWRedirect() {
if ($this->WWW == false) {
$redir = "Location: http://www."; . $this->ServerName;
header($redir);
   }
   }

}

$myURL = new URL();
$myURL->WWWRedirect();

?>



just try "if ($POS !== 0) {"



well, that said, isn't the first position in a string 0 ?

So, in the above  example the OP would need

//  This would mean that www. was found any where in the string
if ( $POS )

or
// Would mean that www. was found at the beginning of the string
if ( $POS === 0 )

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] www. not working

2008-02-15 Thread Valedol
On Fri, 15 Feb 2008 23:46:57 +0300, nihilism machine  
<[EMAIL PROTECTED]> wrote:


this still does not work, if a domain has no preceeding www. it  
redirects to http://www.www.site.com, if it has a www. it goes to  
www.www.mydomain.com, any ideas?


checkWWW();
$this->ServerName = $_SERVER['SERVER_NAME'] . 
$_SERVER['REQUEST_URI'];
}

// Check if site is preceeded by 'WWW'
public function checkWWW() {
$myDomain = $_SERVER['SERVER_NAME'];
$FindWWW = 'www.';
$POS = strpos($myDomain, $FindWWW);
if ($POS === 1) {
$this->WWW = true;
} else {
$this->WWW = false;
}
}

// Redirect to WWW
public function WWWRedirect() {
if ($this->WWW == false) {
$redir = "Location: http://www."; . $this->ServerName;
header($redir);
}
}

}

$myURL = new URL();
$myURL->WWWRedirect();

?>



just try "if ($POS !== 0) {"


--
-

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] www. not working

2008-02-15 Thread Daniel Brown
I'm sorry, the thread to which I was referring is "check if
website has www. in front of domain".

On Fri, Feb 15, 2008 at 3:50 PM, Daniel Brown <[EMAIL PROTECTED]> wrote:
> Go back to the original thread you started (https ).
>
>
>
>  On Fri, Feb 15, 2008 at 3:46 PM, nihilism machine
>  <[EMAIL PROTECTED]> wrote:
>  > this still does not work, if a domain has no preceeding www. it
>  >  redirects to http://www.www.site.com, if it has a www. it goes to 
> www.www.mydomain.com
>  >  , any ideas?
>  >
>  >>
>  >  class URL {
>  >
>  > // Public Variables
>  > public $ServerName;
>  > public $WWW;
>  >
>  > // Public Functions
>  >
>  > public function __construct() {
>  > $this->checkWWW();
>  > $this->ServerName = $_SERVER['SERVER_NAME'] . 
> $_SERVER['REQUEST_URI'];
>  > }
>  >
>  > // Check if site is preceeded by 'WWW'
>  > public function checkWWW() {
>  > $myDomain = $_SERVER['SERVER_NAME'];
>  > $FindWWW = 'www.';
>  > $POS = strpos($myDomain, $FindWWW);
>  > if ($POS === 1) {
>  > $this->WWW = true;
>  > } else {
>  > $this->WWW = false;
>  > }
>  > }
>  >
>  > // Redirect to WWW
>  > public function WWWRedirect() {
>  > if ($this->WWW == false) {
>  > $redir = "Location: http://www."; . 
> $this->ServerName;
>  > header($redir);
>  > }
>  > }
>  >
>  >  }
>  >
>  >  $myURL = new URL();
>  >  $myURL->WWWRedirect();
>  >
>  >  ?>
>  >
>  >  --
>  >  PHP General Mailing List (http://www.php.net/)
>  >  To unsubscribe, visit: http://www.php.net/unsub.php
>  >
>  >
>
>
>
>  --
>  
>
>  Daniel P. Brown
>  Senior Unix Geek
>  
>



-- 


Daniel P. Brown
Senior Unix Geek


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] www. not working

2008-02-15 Thread Daniel Brown
Go back to the original thread you started (https ).

On Fri, Feb 15, 2008 at 3:46 PM, nihilism machine
<[EMAIL PROTECTED]> wrote:
> this still does not work, if a domain has no preceeding www. it
>  redirects to http://www.www.site.com, if it has a www. it goes to 
> www.www.mydomain.com
>  , any ideas?
>
>  
>  class URL {
>
> // Public Variables
> public $ServerName;
> public $WWW;
>
> // Public Functions
>
> public function __construct() {
> $this->checkWWW();
> $this->ServerName = $_SERVER['SERVER_NAME'] . 
> $_SERVER['REQUEST_URI'];
> }
>
> // Check if site is preceeded by 'WWW'
> public function checkWWW() {
> $myDomain = $_SERVER['SERVER_NAME'];
> $FindWWW = 'www.';
> $POS = strpos($myDomain, $FindWWW);
> if ($POS === 1) {
> $this->WWW = true;
> } else {
> $this->WWW = false;
> }
> }
>
> // Redirect to WWW
> public function WWWRedirect() {
> if ($this->WWW == false) {
> $redir = "Location: http://www."; . $this->ServerName;
> header($redir);
> }
> }
>
>  }
>
>  $myURL = new URL();
>  $myURL->WWWRedirect();
>
>  ?>
>
>  --
>  PHP General Mailing List (http://www.php.net/)
>  To unsubscribe, visit: http://www.php.net/unsub.php
>
>



-- 


Daniel P. Brown
Senior Unix Geek


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php