Buying 3 $ for simple htaccess redirect

Discussion in 'Programming' started by harrisunderwork, Sep 20, 2010.

  1. #1
    My htaccess

    Options +FollowSymlinks
    RewriteEngine on
    
    RewriteRule ^apps/apps/([a-z0-9.]+)/ http://www.abc.com/xyz/index.php?userhash=$1
    
    PHP:
    This is uploaded on domain http://www.xyz.com/

    Now when I am trying to access http://www.xyz.com/apps/apps/ajshdkshad/, it is redirecting (301 and 302) me to http://www.abc.com/xyz/index.php?userhash=ajshdkshad

    I dont want redirect, I want htaccess to silently access the url from background.

    Is this possible at all ? If yes, I will pay after testing it.

    Regards.
     
    harrisunderwork, Sep 20, 2010 IP
  2. stephan2307

    stephan2307 Well-Known Member

    Messages:
    1,277
    Likes Received:
    33
    Best Answers:
    7
    Trophy Points:
    150
    As Seller:
    100% - 0
    As Buyer:
    100% - 2
    #2
    I don't think this is possible as it is a different domain. You can only use the mod_rewrite on the same domain. different domains will always redirect.
     
    stephan2307, Sep 21, 2010 IP
  3. MyVodaFone

    MyVodaFone Well-Known Member

    Messages:
    1,048
    Likes Received:
    42
    Best Answers:
    10
    Trophy Points:
    195
    As Seller:
    100% - 1
    As Buyer:
    100% - 1
    #3
    Do you just need some information from the abc site, have you looked at using curl() instead and thus post the gathered information on the xyz site.
     
    MyVodaFone, Sep 21, 2010 IP
  4. stephan2307

    stephan2307 Well-Known Member

    Messages:
    1,277
    Likes Received:
    33
    Best Answers:
    7
    Trophy Points:
    150
    As Seller:
    100% - 0
    As Buyer:
    100% - 2
    #4
    I am not 100% sure but I think that mod_proxy might make it possible to do what you are trying to achieve. However this is not installed on servers really so in order to use it you need a VPS or dedicated server.
     
    stephan2307, Sep 21, 2010 IP
  5. asdirc

    asdirc Active Member

    Messages:
    275
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    53
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #5
    or maybe the solution is to use <iframe> :)
     
    asdirc, Sep 21, 2010 IP
  6. bunbunx2

    bunbunx2 Peon

    Messages:
    613
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #6
    php curl lib works.
     
    bunbunx2, Sep 21, 2010 IP