SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Wizard
    Join Date
    Oct 2004
    Location
    Newport Beach
    Posts
    1,761
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Subdomain Redirect Question (keep subdomain visible)

    I have a subdomain redirect that works like:

    iphone.mysite.com

    I have an iphone web app setup here. The only problem is that when people type iphone.mysite.com they get forwarded to the actual redirect in the address bar.

    Is it possible to display the page iphone.mysite.com/index.html or whatever other file without showing a change of address in the status bar?

    Example:

    right now it does this...

    iphone.mysite.com becomes

    www.myfileserver.com/iphone/

    what I want to happen is have

    iphone.mysite.com to show the page without forwarding the address bar.

    Possible?

    Ryan
    Upcoming Movies - Movie News. Updated Daily.
    Movie Trailers - Awesome trailer site. Nuff said.

  2. #2
    Follow Me On Twitter: @djg gold trophysilver trophybronze trophy Dan Grossman's Avatar
    Join Date
    Aug 2000
    Location
    Philadephia, PA
    Posts
    20,578
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Yes, use mod_rewrite. You'll find tons of examples in this forum of how to rewrite URLs. You need a condition that the subdomain is iphone, then send all requests to /iphone.

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

    Dan's got it right! You can't do a thing with it unless your subdomain is properly configured. Further, I've got to assume it's pointed to the iphone subdirectory of the main domain - but that's not necessary because it can be located ANYWHERE! A subdomain is another domain for the purposes of setting it up and it should NOT redirect to your domain/iphone directory!

    Info about subdomain setup, control panel (e.g., cPanel), etc., would help.

    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

  4. #4
    SitePoint Wizard
    Join Date
    Oct 2004
    Location
    Newport Beach
    Posts
    1,761
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    After searching it I've come to realize that a mod redirect from a subdomain to another domain/IP entirely always shows the change of address in the address bar.

    I'm just going to put everything into the proper folder on my primary server now, no redirect.

    Thanks
    Ryan
    Upcoming Movies - Movie News. Updated Daily.
    Movie Trailers - Awesome trailer site. Nuff said.

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

    Actually, it sounded like you WANT to use the subdomain (without displaying the domain/subdomain_folder) which can be done if the subdomain setup is correct. Otherwise, you're set.

    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
  •