简体   繁体   English

像groovehark / twitter这样友好的网址:example.com/#!/whatever

[英]Friendly URL like grooveshark/twitter: example.com/#!/whatever

I am trying to get the requested URL from PHP. 我试图从PHP获取请求的URL。

The URL is like this: http://example.com/#!/controller/method/var1 URL如下所示: http://example.com/#!/controller/method/var1http://example.com/#!/controller/method/var1

I want to get the /controller/method/var1 part from PHP but all I get is http://example.com/ 我想从PHP获取/controller/method/var1部分,但我得到的只是http://example.com/

How Grooveshark and Twitter handle this? Grooveshark和Twitter如何处理这个问题?

Twitter, Grooveshark and Facebook (before) uses Javascript to get this Friendly URL. Twitter,Grooveshark和Facebook(之前)使用Javascript来获取此友好URL。

Maybe you can use $_SERVER['REQUEST_URI'] to get it with php, i am not sure. 也许你可以使用$ _SERVER ['REQUEST_URI']来获取它,我不确定。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Apache 2阻止网址,例如example.com/?admin - Apache 2 block url such as example.com/?admin 在像 example.com/wordpress 这样的 url 上设置 wodpress 的配置是什么? - What is the configuration for setting up wodpress on a url like example.com/wordpress? 如何从像“example.com/products/123/title-of-this-product”这样干净的 url $_GET['id']? - How to $_GET['id'] from a clean url like "example.com/products/123/title-of-this-product"? 如何指定一个SEO友好的URL,例如twitter www.twitter.com/ <name> 使用YII框架 - How to specify a SEO friendly url like twitter www.twitter.com/<name> using YII framework 如何处理从example.com/search/?s=some到example.com/search/some的URL - How to manipulate the URL from example.com/search/?s=some to example.com/search/some 如何将example.com/index.php#anchor的URL重写为example.com/anchor? - How do I rewrite the URL for example.com/index.php#anchor to example.com/anchor? 基本网址(例如example.com)在NGinx中不起作用 - Base URLs like example.com not working in NGinx 在以下链接中实现斜杠:example.com/parameter - Implementing slash in links like: example.com/parameter 检测URL标记example.com/page.php#anycontent - Detect URL tags example.com/page.php#anycontent 传递example.com时,parse_url()返回错误 - parse_url() returns an error when example.com is passed
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM