Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. apache and mod_rewrite

apache and mod_rewrite

Scheduled Pinned Locked Moved Web Development
apachephpcomhelpquestion
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Sam 2006
    wrote on last edited by
    #1

    hi all, i need help with my website. i've got a few subdomains that show files in the /public_html/subdomain directory. so something.mydomain.com shows files in mydomain.com/something. does anyone know of a way to make something.mydomain.com show files in mydomain.com/anything/somethingelse? i don't want to use redirects, i want something.mydomain.com/foo.php to stay in the client's address bar but show mydomain.com/anything/somethingelse/foo.php. i've asked on 2 different newsgroups but haven't gotten any solutions. i don't even know if this is possible. does anyone have any suggestions? thanks in advance, sam kline

    B A 2 Replies Last reply
    0
    • S Sam 2006

      hi all, i need help with my website. i've got a few subdomains that show files in the /public_html/subdomain directory. so something.mydomain.com shows files in mydomain.com/something. does anyone know of a way to make something.mydomain.com show files in mydomain.com/anything/somethingelse? i don't want to use redirects, i want something.mydomain.com/foo.php to stay in the client's address bar but show mydomain.com/anything/somethingelse/foo.php. i've asked on 2 different newsgroups but haven't gotten any solutions. i don't even know if this is possible. does anyone have any suggestions? thanks in advance, sam kline

      B Offline
      B Offline
      Bradml
      wrote on last edited by
      #2

      Try setting the root directories to the same directory, that way both sites contain the same information. This help? if not then I'll provide more assistance

      1 Reply Last reply
      0
      • S Sam 2006

        hi all, i need help with my website. i've got a few subdomains that show files in the /public_html/subdomain directory. so something.mydomain.com shows files in mydomain.com/something. does anyone know of a way to make something.mydomain.com show files in mydomain.com/anything/somethingelse? i don't want to use redirects, i want something.mydomain.com/foo.php to stay in the client's address bar but show mydomain.com/anything/somethingelse/foo.php. i've asked on 2 different newsgroups but haven't gotten any solutions. i don't even know if this is possible. does anyone have any suggestions? thanks in advance, sam kline

        A Offline
        A Offline
        alex barylski
        wrote on last edited by
        #3

        Yes, it's possible...I did this just the other day... Under linux, you need to edit your HOSTS file and point sub.domain.com to localhost or whatever IP or address you have assigned. Then I modified httpd.conf and added two seperate The first one is the primary (www.domain.com) and is used whenever no other subdomain is provided... The second or more are the sub-domain entries Each of the allow you to map sub-domains to any directory you wish... No mod_rewrite required :P

        It's frustrating being a genius and living the life of a moron!!!

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups