Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 3 of 3
  1. #1
    Junior Member
    Join Date
    Nov 2010
    Posts
    1
    Member #
    25222
    Hi folks.

    I have one website, but different domains, eg, a .co.uk domain, co.nz, .ca and .co.za.

    they all point to the one website, but I want to set up customised files for pages such as home, contact etc. I want to create these pages in a subfolder, eg, '/nz/' and the htaccess files checks if that files exists, if it does, use it, if it doesn't use the defualt page from the main website

    if domain = .co.nz
    if file request also exists in a folder "/nz/"
    silently redirect user to the nz version of the file


    hope that makes sense?

    if anyone has any ideas - please let me know!


    J

  2.  

  3. #2
    Junior Member
    Join Date
    Nov 2003
    Location
    NYC
    Posts
    5
    Member #
    3996
    PHP Case

    I did the same thing but didn't use .htaccess but a php script. Using the Switch/case structure. do a google search for 'php switch case domain' and you will see some examples of this. Basically your taking the http_host variable and comparing it to the ones that you want to switch. While you will have a default value that rest will default to. Hope this helps.

  4. #3
    Senior Member Dorky's Avatar
    Join Date
    Jun 2009
    Location
    Destin Florida
    Posts
    1,430
    Member #
    19103
    Liked
    4 times
    php for sure. my index is all php and all it does is gather data then pull the content required to build the page.

    while($get_it !== true){ continue; }


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 09:42 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com