简体   繁体   中英

Using PHP for Flash/SWF Address app alt content

I have a Flash app that uses an implementation of SWF Address for deep linking our Flash content. A simple URL might look like this: http://www.domain.com/#/uk/section/content . This has worked great for us so far, and is deeply intertwined in our in-house toolkit.

Now I need PHP to be able to read these values and supply some alternative content depending on the URL. After not having much success I read this: Get fragment (value after hash '#') from a URL in php and learned that the data after and including the # is never sent to the server.

My question is, what are my options? So far I see it like this:

Option 1: Accept that an overhaul of the deep linking system is required, and move to a system using mod_rewrite to parse 'proper' URls that the PHP can also read.

Option 2: Use Javascript to read the existing URL style as the page loads. Because the content to be inserted will need loaded from XML I'm concerned that this will be disruptive to the normal loading of the page. Also will this subsequent data load prevent the content from being read by search engines and other robots?

Which idea is best, or is there a better option I'm not thinking of?

You can use Javascript and follow Google's guidelines to indexable AJAX Content: " Making AJAX Applications Crawlable ".

In fact you are using the escaped fragment "#!" as prefix that both Facebook and Twitter already implemented. This way Google recognizes your "AJAX-URLs" as stand-alone URLs and is capable to crawl them.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM