1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

RewriteRule URL parameter issue

Discussion in 'Apache' started by Talker, Apr 19, 2012.

  1. #1
    Hi guys,

    I need to get this URL RewriteRule setup

    I have a page named 'abc.php' which lies under a folder named 'xyz'.
    The abc.php is passed a URL that can contains any number of parameters and URL valid characters including /:&?= etc.

    for example..
    http://www.domain.com/xyz/abc.php?url=www.anotherdomain.com/page.php?i=123123&u=sample

    The parameter in this case is www.anotherdomain.com/page.php?i=123123&u=sample , its what i need to pass over to the abc.php


    I want to rewrite this as a rule under htaccess so that it works like...
    http://www.domain.com/img/www.anotherdomain.com/page.php?i=123123&u=sample


    I have tried the following which works somewhat,
    RewriteRule ^img/(.*)$ /xyz/abc.php?url=$1 [L]

    however passes only the following to the abc.php script....
    www.anotherdomain.com/page.php , and not the the parameters ?i=123123&u=sample , which are removed completely.


    I'd be thankful and will give my services as a courtesy gift to anyone that helps me out with this....
    Awaiting..
     
    Last edited: Apr 19, 2012
    Talker, Apr 19, 2012 IP
  2. Talker

    Talker Peon

    Messages:
    2,797
    Likes Received:
    108
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Is there anyone who can help me?
     
    Talker, Apr 21, 2012 IP