mod_rewrite: escape part of the original url

Discussion in 'Apache' started by karabas, Jan 18, 2008.

  1. #1
    Is it possible to create rule/ruleset that would change

    http://www.example.com/url/http://www.test.com/page1.php?p1=a&p2=b

    to

    http://www.example.com/url.php?url=http://www.test.com/page1.php%3fp1=a%26p2=b

    so that if I wrote the following code in url.php

    <?=$_REQUEST['url']?>

    I would get

    http://www.test.com/page1.php?p1=a&p2=b

    as the content of the page?
     
    karabas, Jan 18, 2008 IP