To any urlrewrite gurus out there, I'm trying to map an anchor style path (/#node/1) to a drupal path (/node/1, /q="node/q") but am not sure how to do that, or if its even possible.

Why? you might be asking ... Well, I'm working on a full flash site using Drupal as the backend, as I have done before, and have an idea of a way to have the site be fully search engine indexable. I'm using the swfObject javascript embed script which will allow me to essencially replace any html element id with flash. So, I want to have my Drupal site there like normal only the and all content underneath will be replaced by fullscreen flash. Flash will read the url path and go to the appropriate section. So if I link directly to "/node/5", the page will redirect to "/#node/5", but the same page html will be loaded, and Flash will replace it and go directly to its own version of the particular bit of the node/5 content. This would apply to all paths on my Drupal site. This way if someone bookmarks or wants to link to a page while looking at the site in flash (ie. "http://example.com/#about"), this page can be indexed by a crawler which will be fed the appropriate "about" content.

I hope this makes sense.

Thanks,
Scott Nelson

Comments

snelson’s picture

The reason I'm using hashes is that flash cannot update the url via javascript without the page refreshing, so I'm updating the hash instead, which does not fire a redirect and allows flash to happily chug along, and working with the back button and bookmarking.

eagereyes’s picture

This is not possible, because the server never sees the hash and the part behind the hash. The browser requests the URL of the page, and then looks for the anchor within that page to jump to. So rewriting won't work. Same for crawlers of course, they don't tell you the anchor (and most likely ignore it completely).

EagerEyes.org

snelson’s picture

Thanks!