0

I am trying to get the requested URL from PHP.

The URL is like this: http://example.com/#!/controller/method/var1

I want to get the /controller/method/var1 part from PHP but all I get is http://example.com/

How Grooveshark and Twitter handle this?

Patrick Mevzek
  • 10,995
  • 16
  • 38
  • 54
AngelBroz
  • 68
  • 1
  • 4

1 Answers1

2

Twitter, Grooveshark and Facebook (before) uses Javascript to get this Friendly URL.

Maybe you can use $_SERVER['REQUEST_URI'] to get it with php, i am not sure.

Estefano Salazar
  • 419
  • 4
  • 15
  • You can't get it with $_SERVER['REQUEST_URI'] or any other Server variable because is not sent to the server. But, yes! i will use Javascript to handle the Friendly URl, i will load the header and the footer, and the javascript, then i will get that friendly url to load it with ajax. – AngelBroz Mar 29 '12 at 21:59