Hi, first of all, I've been searching all night for a solution to this and haven't been able to find anything. Most [RESOLVED]s I've found have been about manipulating the anchors within the page etc.
I have a Joomla! site in a subdirectory from the root and in the root's index.php I have a full screen iframe displaying the Joomla! site. It all works perfectly and I've got quite far, just one last step to do.
Why would I do this you ask? Well, I've done it to enable a radio player on the site that works asynchronously to the site, so that it doesn't refresh on each page refresh.
This is the code snippet I'm using:
PHP Code:function locFix() {
//DEBUG alert("locFix function [FOUND]");
var iframe = document.getElementById("siteframe");
var relUri = iframe.contentWindow.location.pathname;
//DEBUG alert(relUri);
window.location.hash = relUri;
}
This works brilliantly but I want it slightly better with something I'm sure you can do with mod_rewrite, I just haven't been able to find out how.Code:<body><iframe src="joomla/index.php" id="siteframe" frameborder="0" marginwidth="0" marginheight="0" width="100%" height="100%" onload="locFix();"></iframe></body>
The script sets the url tohttp://www.domain.com/#/joomla/index.phpbut I'd like to rewrite that url tohttp://www.domain.com/index.phpor evenhttp://www.domain.com/joomla/index.phpif that's not possible. Just so that it's Search Engine friendly and idiot proof (user proof!).
Facebook uses the same technique to handle embedded iframes' urls, but I haven't been able to find the rewrite rule at all.
Thank you for any hep you can give on this. I can give any more information needed, I hope it's clear what I'm trying to achieve.



).
Reply With Quote
Bookmarks