Announcement

Collapse
No announcement yet.

Website host and names

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Website host and names

    I have a question for you Poly people:

    I rent a shared hosting and I have reserved two domain names.

    Is this possible to point the two domain names on two different location on my shared hosting.

    Example:
    I point one of my domain name ex:www.mydomain.com to the IP adress of my host server.

    And with my second name ex:www.mysecond.com, I would redirect all the people to a location; that would be


    I know this is possible, but now, I want to know if it's possible to redirect it in a way that Firefox or IExplorer would think you're really on:
    www.mysecond.com and not on: www.mydomain.com/cronos_qc

    So in the location bar when you type: www.mysecond.com, it will continue to show: www.mysecond.com and if you enter a sub-folder like "poly" it will show www.mysecond.com/poly/ and not: www.mydomain.com/cronos_qc/poly


    I wish this is clear.
    bleh

  • #2
    It can easily be done with a simple .htaccess file.

    Assuming you are using Apache, copy the following into a blank text file and save it as '.htaccess' (without the '' and with nothing before the .):
    Code:
    RewriteEngine on
    RewriteRule    ^$    index.php    [L]
    RewriteRule    ^([a-zA-Z0-9\-\_/]*)/$                  http://www.mydomain.com/whatever/$1/index.php        [L]
    RewriteRule    ^([a-zA-Z0-9\-\_/]*)\.(html|htm)$       http://www.mydomain.com/whatever/$1.php              [L]
    RewriteRule    ^([a-zA-Z0-9\-\_/]*)$                   http://www.mydomain.com/whatever/$1.php              [L]
    The first line activates everything...
    The next line sets the default page to 'index.php'.
    The third, fourth, and fifth lines use the '$1' wildcard. So www.second.com/$1 really translates to www.mydomain.com/whatever/$1.
    The third line looks for a folder which matches '$1'.
    The fourth line makes calls to html files point to the php equivalents. Useful for pretending you have files called '.cronos_qc' which are really '.php' files.
    The last line just gives you the file you want if you type the address in exactly (whilst still hiding the directory).

    Just put the file you've just made (and edited hopefully ) into the directory that www.second.com points to.
    Ceeforee v0.1 - The Unofficial Civ 4 Editor -= Something no Civ Modder should ever be without =- Last Updated: 27/03/2009
    "Just because I'm paranoid doesn't mean there's no conspiracy"

    Comment


    • #3
      Gracias Mister!!
      bleh

      Comment


      • #4
        No probs... I just pulled that from my own site and changed the names to protect... well, me.
        Ceeforee v0.1 - The Unofficial Civ 4 Editor -= Something no Civ Modder should ever be without =- Last Updated: 27/03/2009
        "Just because I'm paranoid doesn't mean there's no conspiracy"

        Comment


        • #5
          He still needs to modify apache configurations to allow for .htaccess files.
          (\__/) 07/07/1937 - Never forget
          (='.'=) "Claims demand evidence; extraordinary claims demand extraordinary evidence." -- Carl Sagan
          (")_(") "Starting the fire from within."

          Comment


          • #6
            @UR

            I just made a test, created .htaccess on my root and I edited the files:

            And it's working... so the server is accepting the files. In the Contract Agreement, I have the right to use this file!

            But I didn't try MMC script now, I wait to order my second domain names tomorrow evening!
            bleh

            Comment


            • #7
              just to make sure MMC;
              line 4, i dont need it at all, since i will be using only .html files!?
              bleh

              Comment


              • #8
                Originally posted by cronos_qc
                And it's working... so the server is accepting the files. In the Contract Agreement, I have the right to use this file!
                Okay, so the hosting company has already made apache to accept .htaccess files in individual directories.

                Good thing
                (\__/) 07/07/1937 - Never forget
                (='.'=) "Claims demand evidence; extraordinary claims demand extraordinary evidence." -- Carl Sagan
                (")_(") "Starting the fire from within."

                Comment


                • #9
                  Originally posted by cronos_qc
                  just to make sure MMC;
                  line 4, i dont need it at all, since i will be using only .html files!?
                  You don't need it if you don't want it. Although you could make it point .htm files to the .html versions if you wanted.
                  Ceeforee v0.1 - The Unofficial Civ 4 Editor -= Something no Civ Modder should ever be without =- Last Updated: 27/03/2009
                  "Just because I'm paranoid doesn't mean there's no conspiracy"

                  Comment


                  • #10
                    Originally posted by Urban Ranger Okay, so the hosting company has already made apache to accept .htaccess files in individual directories.

                    Good thing
                    That's pretty standard unless you have a paranoid host.
                    Ceeforee v0.1 - The Unofficial Civ 4 Editor -= Something no Civ Modder should ever be without =- Last Updated: 27/03/2009
                    "Just because I'm paranoid doesn't mean there's no conspiracy"

                    Comment

                    Working...
                    X