subdomain redirects

Discussion in 'Computer Support' started by obarrera, Mar 15, 2006.

  1. obarrera

    obarrera Guest

    I need help do some settings in the sports Server in order to allow sub
    domains and redirect it to messages section.

    For example: I need to create a wildcard subdomain that excutes a
    script at a different location.

    1) lets say going to this url:

    http://subdomain.sports.com

    this must execute a script in

    http://www.sports.com/messages/goods/?goods=subdomain

    2) lets say going to this url:

    http://john.www.sports.com

    this must execute a script in

    http://www.sports.com/messages/goods/?goods=john

    Thanks,
    I will greatly appreciate your help
     
    obarrera, Mar 15, 2006
    #1
    1. Advertisements

  2. obarrera

    Jw Guest

    Need a bit more info

    if i go to say bob.sports.com you want it execute that script but you
    want the url to still be bob.sports.com? I don't think most server side
    software will allow it out of the box but you could try doing SSI
    (Server Side Includes) Most webservers have this enabled.

    I think there is a guide to do this on www.htmlgoodies.com (if the page
    still exists)

    I bet the server could be configured to allow it to execute, not sure on
    the security risks on this but i bet it would be something like below.

    say your path to the subdomain is
    /var/www/html/subdomain

    and the path to the script is
    /var/www/messages/goods/

    you could try calling the file as:
    .../message/goods/?goods=subdomain

    If you are using Apache you can use .htaccess to redirect the request.
    here is a tutorial on htaccess:
    http://httpd.apache.org/docs/trunk/howto/htaccess.html

    I didn't see it there but what you are looking for is Redirect and or
    ModRewrite (i think)

    anyway i hope some of this helps

    Joe
     
    Jw, Mar 16, 2006
    #2
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.