SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    Ex-SitePointer silver trophy
    iFroggy's Avatar
    Join Date
    Oct 2000
    Location
    Harbinger, NC, U.S.A.
    Posts
    4,126
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Redirect Entire Directory?

    I am not sure if this is the right forum for this but...

    I had a site in which it would be linked to http://www.domainname.com/directory/files, now I am probably going to move to another server and it will be http://www.domainname.com/files.

    Can I put something in a directory that forwards all queries to that directory to a domain?

    Meaning, I want it to be like this:

    Type in http://www.domainname.com/directory/files and go to http://www.newdomain.com. Type http://www.domainname.com/directory/files/thisone.txt and go to http://www.newdomain.com.

    If I can do this... any help would be appreciated.

  2. #2
    Next stop: PHP! Marina's Avatar
    Join Date
    Apr 2001
    Location
    Sweden
    Posts
    692
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I have read somewhere that it can be done by using the base element. Unfortunately that's all I remember. Maybe someone could comment on this.

  3. #3
    You talkin to me? Anarchos's Avatar
    Join Date
    Oct 2000
    Location
    Austin, TX
    Posts
    1,438
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The base element won't help, you need to use mod_rewrite (assuming it's an apache server): http://httpd.apache.org/docs/misc/rewriteguide.html . It's a pretty complicated technology.
    ck :: bringing chris to the masses.

  4. #4
    Ex-SitePointer silver trophy
    iFroggy's Avatar
    Join Date
    Oct 2000
    Location
    Harbinger, NC, U.S.A.
    Posts
    4,126
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the info guys.

    No one knows of an easy way to accomplish this?

  5. #5
    ALT.NET - because we need it silver trophybronze trophy dhtmlgod's Avatar
    Join Date
    Jul 2001
    Location
    Scotland
    Posts
    4,836
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    if ur using asp, u could add in the global.asa file something like

    Code:
    Sub session_onStart()
     If instr(request.servervariables("SCRIPT_NAME"), "directory_name")) then response.redirect("url")
    end sub


    hope that helps

  6. #6
    Ex-SitePointer silver trophy
    iFroggy's Avatar
    Join Date
    Oct 2000
    Location
    Harbinger, NC, U.S.A.
    Posts
    4,126
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Unfortunately, I do not have ASP. Thanks anyway.

  7. #7
    Xbox why have you forsaken me? moospot's Avatar
    Join Date
    Feb 2001
    Location
    Clearwater, FL
    Posts
    3,615
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What do you have?


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
  •