Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

$_SERVER['PATH_INFO'] won't work.

Status
Not open for further replies.

pugs421

Technical User
Nov 25, 2002
114
US
I am trying to make search enging friendly URL's. The articles that I have read suggest using $_SERVER['PATH_INFO']. When I write "echo $_SERVER['PATH_INFO'];" on my pages, it does not display anything. Does anyone know why I am unable to display this value?

Thanks
 
This may be helpful:

Operating system Linux
Kernel version: 2.4.21-15.ELsmp
Apache version 1.3.33 (Unix)
PHP version 4.3.10
 
But my version is 1.3.33,right? I'm sorry, I don't understand.
 
I am not sure if you understand what the PATH_INFO variable displays. If you do, I apologize in advance.

In a URL PATH_INFO is whatever follows the URL, for example:
Code:
[URL unfurl="true"]http://www.mydomain.com/index.php[/URL][COLOR=red]/this/is/the/pathinfo/[/color]
The variable is only in existence if there is the additional info appended to the URL. If there is none, the variable will not be present in the Apache environment.

I have used PATH_INFO in various scenarios, it is very helpful for example when having a PHP application that can take different templates to display, e.g. the same functionality for different customers.

Again, I am not trying to insult you, but I wanted to give it a shot to clear it up in case you think PATH_INFO is something else than it is.
 
LOL. Good troubleshooting DRJ. Next I'll ask which button is the 'any key'. Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top