SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Member
    Join Date
    Jul 2004
    Location
    Milky way
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    mod rewrite sub domain help

    Hi

    I have some problems setting mod rewrite for my server.

    Currently I have 'subdomain.domain.com/'.This subdomain is another server that host all the files.

    What I want is that all files on subdomain server would look like this:
    'domain.com/subdomain/files'

    Currently I am using a simple redirect:
    'Redirect /subdomain/files http://subdomain.domain.com/'

    it is working ok, but the problem is I had to add another server that hosts the files and I want the link structure exactly the same.

    Kind Regards

    Gregor

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

    I'm in my usual state: Confused. Are all domains on a single server? Do they all point to the same Document Root. If so, things will be easy - if not, it could be very difficult.

    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

  3. #3
    SitePoint Member
    Join Date
    Jul 2004
    Location
    Milky way
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi

    no, the file.domain.com is actually another server(second server) and they do not have the same document root. I have been told to setup the main domain (first server) (domain.com) as some kind of proxy with Apache mod_proxy.

    I have tried to setup something with mod rewrite from tutorials & examples on this board, but I think all those examples were made, where the subdomain files were actually on one single server.

  4. #4
    SitePoint Member
    Join Date
    Jul 2004
    Location
    Milky way
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok, I have searched and found out that something can be done with ProxyPass Directive

    But my question is, if the bandwith form the main server (domain.com) stays untouched?


    Regards

  5. #5
    Certified Ethical Hacker silver trophybronze trophy dklynn's Avatar
    Join Date
    Feb 2002
    Location
    Auckland
    Posts
    14,692
    Mentioned
    20 Post(s)
    Tagged
    3 Thread(s)
    Zink,

    If you're sending the requests from the subdomain server to the domain server, the bandwidth at the domain server will increase (with the addition of the subdomain traffic).

    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

  6. #6
    SitePoint Member
    Join Date
    Jul 2004
    Location
    Milky way
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hm, so this is not the solution. Can this be dome somehow with mod rewrite?

  7. #7
    SitePoint Evangelist
    Join Date
    Aug 2005
    Posts
    512
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm not sure, but maybe what you want is creating 'A' record for the subdomain with the IP of another server in the DNS setup.
    You should ask your host or registrer for how to do it, depending on which DNS you are using.
    Freebie/DonationWare: check-these.info
    Custom solutions: Hostwick.com


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
  •