|
|
|
|
||||||
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 |
|
Messages: n/a
Hébergeur: |
In my old server running Apache 1.3 and PHP 4 this code will return just the URI as expected: $_SERVER["REQUEST_URI"] = "/some-html-file.html" In my new server with Apache 2 & PHP 4 this code returns the domain: $_SERVER["REQUEST_URI"] = "/full-domain-name.com/some-html-file.html" Does anyone know a way to change things so the code will not return the domain name and whether this is because of PHP or Apache that I'm suddenly getting the full domain name? |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
junk@realtechtalk.com wrote:
> > In my old server running Apache 1.3 and PHP 4 this code will return just > the URI as expected: > > > > > > $_SERVER["REQUEST_URI"] = "/some-html-file.html" > > > > > > In my new server with Apache 2 & PHP 4 this code returns the domain: > > > $_SERVER["REQUEST_URI"] = "/full-domain-name.com/some-html-file.html" > > > > > > Does anyone know a way to change things so the code will not return the > domain name and whether this is because of PHP or Apache that I'm > suddenly getting the full domain name? > Windows, linux, Sun, etc... Which version of PHP and Apache (old and new) exactly? Sounds to me like the new system is running with a DNS redirect. A friend of mine a month ago or so, had a similar setup. He was using a DNS redirect to hit the correct page on a IIS server. Poor mans way of doing virtual hosting. Am I anywhere close? -- Jim Lucas "Perseverance is not a long race; it is many short races one after the other" Walter Elliot "Some men are born to greatness, some achieve greatness, and some have greatness thrust upon them." Twelfth Night, Act II, Scene V by William Shakespeare |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
On Fri, 14 Sep 2007, junk@realtechtalk.com wrote:
> In my old server running Apache 1.3 and PHP 4 this code will return just the > URI as expected: > > $_SERVER["REQUEST_URI"] = "/some-html-file.html" > > In my new server with Apache 2 & PHP 4 this code returns the domain: > > $_SERVER["REQUEST_URI"] = "/full-domain-name.com/some-html-file.html" basename() will assist you in getting the last part of the $_SERVER['REQUEST_URI'] path.. seems like that's what you're after. http://php.net/basename -- Greg Donald Cyberfusion Consulting http://cyberfusionconsulting.com/ |
|
![]() |
| Outils de la discussion | |
|
|