Hi all. I have a javascript frameset which I think is screwing up my URLs using mod_rewrite or it may just be my mod_rewrite rule, I'm not sure.
The frameset:
document.write('<frameset id="TopFrame" rows="20%,80%" frameborder="0" framespacing="0">');
document.write('<frame scrolling="no" src="top.php" name="top">');
document.write('<frameset id="BottomFrame" cols="21%,79%" frameborder="0" framespacing="0">');
document.write('<frame src="content_sb.php" name="left">');
document.write("<frame src=' + "<?php echo $SERVER_NAME; ?>" + "/" +
(location.search?location.search.substring(1):'content.php') + "' name='right'>"
document.write('</frameset>');
Using the rule:
RewriteRule content-(.*)-(.*)-(.*)\.php$ /content\.php?category_id=$1&subcategory_id=$2&item_id=$3
with a URL such as:
Everything works fine. The page doesn't open in the frameset, but that is what it's supposed to do.
with a URL such as:
Everything works fine. The page opens in the frameset as it is supposed to do.
What I want is a rewrite rule that maps to
so the page opens in the correct frame of the frameset.
I have tried the following rewrite rule:
RewriteRule content-(.*)-(.*)-(.*)\.php$ /index2\.php?content\.php?category_id=$1&subcategory_id=$2&item_id=$3
but it doesn't work for some reason, the page in the right frame ends up being "content.php" (location.search doesnt exist), either because of the javascript frameset or just the rewrite rule.
Could you please help me with this?
Thanks.
The discipline used to write things down is the first step in making them a reality.
The frameset:
document.write('<frameset id="TopFrame" rows="20%,80%" frameborder="0" framespacing="0">');
document.write('<frame scrolling="no" src="top.php" name="top">');
document.write('<frameset id="BottomFrame" cols="21%,79%" frameborder="0" framespacing="0">');
document.write('<frame src="content_sb.php" name="left">');
document.write("<frame src=' + "<?php echo $SERVER_NAME; ?>" + "/" +
(location.search?location.search.substring(1):'content.php') + "' name='right'>"
document.write('</frameset>');
Using the rule:
RewriteRule content-(.*)-(.*)-(.*)\.php$ /content\.php?category_id=$1&subcategory_id=$2&item_id=$3
with a URL such as:
Everything works fine. The page doesn't open in the frameset, but that is what it's supposed to do.
with a URL such as:
Everything works fine. The page opens in the frameset as it is supposed to do.
What I want is a rewrite rule that maps to
so the page opens in the correct frame of the frameset.
I have tried the following rewrite rule:
RewriteRule content-(.*)-(.*)-(.*)\.php$ /index2\.php?content\.php?category_id=$1&subcategory_id=$2&item_id=$3
but it doesn't work for some reason, the page in the right frame ends up being "content.php" (location.search doesnt exist), either because of the javascript frameset or just the rewrite rule.
Could you please help me with this?
Thanks.
The discipline used to write things down is the first step in making them a reality.