On 5/25/06, Mariusz Handke <oiram@xxxxxxxxx> wrote:
Thanks, I modified your proposition as follows: <Location /test> RewriteEngine On RewriteRule ^(.*)/([^/]*\.)(html|htm|php)$ /test-redir.php?page=/test/$2$3 [L] </Location>
Hmmm. This rewrites /test/index.html to test-redir.php?page=/test/index.html. Looks like what you want. But since you are not doing anything with the first captured regex you don't need to capture it.
and rule works ok, but produced result (two frames: top one containing original file, and bottom one used for some statistics generation and so on) does not display original file, you can check this link: http://alice.oiram.net/test/index.html how the result looks like, I tried NS option without success if I stop rewrite engine "result" shows page properly, similar to that: http://alice.oiram.net/test-noredir.php
You're using frames. You need to understand how they work. The framset your php script produces contains: <frame name="top" scrolling="yes" noresize src="/test/index.html"> <frame name="bot" scrolling="no" noresize src="/test-stat.php"> So the client browser then requests /test/index.html again, which will again be rewrittten. You probalby don't want that. You need to do this differently. The way I would do this is change my php script so it includes the different pages in one page, in stead of a frameste. But this is outside the scope of this list. Krist -- krist.vanbesien@xxxxxxxxx Solothurn, Switzerland --------------------------------------------------------------------- The official User-To-User support forum of the Apache HTTP Server Project. See <URL:http://httpd.apache.org/userslist.html> for more info. To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx " from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx