SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Mar 2007
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Htaccess help needed

    Hi,


    Urgent help needed.

    I have 2 servers ,

    server A with IP address 1.2.3.4 and server B with IP address 5.6.7.8

    Users can upload files to server A and server B.

    Suppose if a person comes to server A and request a file in Server B , my script redirects him to server B and help him with the file download.

    But it shows in browser that 5.6.7.8/~username/file.php

    Am after an htaccess rule that helps me to get the file downloaded from server B even though he comes in server A( hence redirection rule in .htaccess doesn't apply ), but in browser it should display my domain name instead of 5.6.7.8/~username/file.php

    Confused ? Else please help.

  2. #2
    Certified Ethical Hacker silver trophybronze trophy dklynn's Avatar
    Join Date
    Feb 2002
    Location
    Auckland
    Posts
    14,656
    Mentioned
    19 Post(s)
    Tagged
    3 Thread(s)
    FB,

    To access a file via http on a domain, that domain's name (or number) MUST be displayed in the browser's location box. This is a security issue and is, IMHO, correct.

    To your problem, no, you can't do it with .htaccess.

    You can, however, provide the file via PHP if on the same server (or via fopen() on the Internet).

    There's always more than one way to skin a cat!

    Regards,

    DK
    David K. Lynn - Data Koncepts is a long-time WebHostingBuzz (US/UK)
    Client and (unpaid) WHB Ambassador
    mod_rewrite Tutorial Article (setup, config, test & write
    mod_rewrite regex w/sample code) and Code Generator


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •