Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    Senior Coder jcdevelopment's Avatar
    Join Date
    Oct 2007
    Location
    Cowboy Nation
    Posts
    2,182
    Thanks
    174
    Thanked 257 Times in 257 Posts

    redirecting a folder to be the URL?

    How can i take a folder for example:

    http://www.sitename.com/folder/
    and change that to

    folder.sitename.com

    How would i go about changing that so when somone types in folder.sitenmae.com it will automatically go to that folder's index page?

    Im not sure if that is confusing but let me know if you need more info. Thanks guys!

  • #2
    Senior Coder
    Join Date
    Jul 2005
    Location
    UK
    Posts
    1,051
    Thanks
    6
    Thanked 13 Times in 13 Posts
    You set up a subdomain in your hosting control panel. You can then set the destination of that subdomain - the place where it will pull content from - to anything you like.

    Check your hosts help files for how to set up a subdomain.

  • #3
    Master Coder
    Join Date
    Jun 2003
    Location
    Cottage Grove, Minnesota
    Posts
    9,526
    Thanks
    8
    Thanked 1,091 Times in 1,082 Posts
    No examples for you, but my feeling is it's going to be an .htaccess rewrite rule.

    Search using Google: .htaccess rewrite url

    Check back again, because others might
    have an actual example to give you.

  • Users who have thanked mlseim for this post:

    jcdevelopment (06-02-2008)

  • #4
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,863
    Thanks
    160
    Thanked 2,224 Times in 2,211 Posts
    I think http://www.codingforums.com/showthread.php?t=75198 is all about this! (and you may get some more from this sub-forum)
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #5
    Senior Coder jcdevelopment's Avatar
    Join Date
    Oct 2007
    Location
    Cowboy Nation
    Posts
    2,182
    Thanks
    174
    Thanked 257 Times in 257 Posts
    ok, thats really what i was lloking for. I googled it and found a real easy way that explained it pretty well. Thanks to all of the suggestions.

    here is the site if anyone needs to know in future questions.

  • #6
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Though many web hosts make it very easy for you to setup subdomains so you may want to try that first as it saves you some work.
    ||||If you are getting paid to do a job, don't ask for help on it!||||


  •  

    Posting Permissions

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