Submit Your Article Forum Rules

Results 1 to 10 of 10

Thread: 500 websites - 1 template?

  1. #1
    Junior Member
    Join Date
    Jul 2003
    Posts
    6

    500 websites - 1 template?

    Apologies up front if this is posted in the wrong section.

    Is it possible to design a single website which has around 30 different pages. Let's call it www.johndoe.com.

    Then in the background somewhere have a database of say 500 different batches of names, specific content, contact details, maybe even a logo.

    Then using the initial site actually dynamically create what are effectively 500 different websites using a URL such as www.johndoe.com/1 ; www.johndoe.com/2 ; www.johndoe.com/3 and etc.

    This would mean that when the user typed in the URL the website would effectively pick up the data specific to the url and insert it automatically?

    This would not just relate to the title but to specific content within the 30 or so pages.

    Any thoughts on whether this would be possible, how it would be done and if you know of any examples would be greatly appreciated.

  2. #2
    Hi kengeddes

    You could use subdomains and call them say www.1.johndoe.com, www.2.johndoe.com, www.3.johndoe.com and then use something like php and mysql.

    Mike
    New SiteWhy Me Guy

  3. #3
    it could be done..would require a lot of time and coding..but you could basicly have though where you are goign to have the url like www.johndoe.com/2 you are sendign it to a diff dir..so you would have to have the page script all in the dir too..so would be better to just write each page out for each diff site..if your goign to go through all that work..

    Although I know with my portfolio I only use one page and it contains all the data for my resume, clients, education, indea, etc...

    so it can be down..but instead of putting the /2 at the end I would put like ?site=1 and then on th epage have like the script

    <?php

    if (site == 2){
    echo " your site "
    }

    that should work for you...

    thanks,
    Micheal Geldart
    CalypsoWebDesign.com
    www.calypsowebdesign.com
    Three Months Free Hosting! Find Out How?
    Feel Free To Review:CalypsoWebDesign.com

  4. #4
    Senior Member
    Join Date
    May 2004
    Posts
    199
    Depending on what the site is/can be written in..
    In php for example, use
    $r=getenv("PATH_INFO"); or
    $r=getenv("REQUEST_URI");
    $var_array = explode("/",$r);
    to pull apart the URL and assign it to a variable, say $foo

    Then get any part of the url which is actually your variable to identify the correct information in your database..

    SELECT * FROM tablename WHERE template_style='$foo';

    Hope this helps..

  5. #5
    Senior Member
    Join Date
    Apr 2004
    Posts
    446
    Yes, that's works particularly well with a mod_rewrite setup like this:
    Code:
    RewriteEngine on
    RewriteCond %{REQUEST_URI} !/static/.*
    RewriteRule .* index.php
    Basically every request goes to your script, except things you don't want, like requests for images and js files.

    Then you can take apart the request as per the suggestion above. I usually go:
    Code:
    $url_vars = explode('/',$_SERVER['REQUEST_URI']);
    // more code...like regex. Also you need to
    //redirect to /foo/ if user requests /foo because
    //apache can't do this for you any more.
    $sql = "SELECT stuff FROM tbl WHERE cat = '{$url_vars[1]}'";
    and so on.

    Then make all your links relative to doc root, like this:
    href="/cat/subcat/some_product.htm"

    Works sweet, and is of minimal difficulty. As an added bonus, you'll never get a 404 again :)

  6. #6
    Junior Member
    Join Date
    May 2004
    Posts
    2

    I have done it in ColdFusion

    If you would have a look at www.bearep.com you will see the master site. This site contains any categories of products, etc. Then you can go to www.paintballrewards.com or www.safetyshow.com and you will see content pertaining only to each specific URL based on admin settings for that URL. Each customer can have as many URLs in their account as they like and each URL can have as many of the parent categories as they like. This allows (in this case) a site to have as many URLs as they like that pertain to certain realms of products which in the end helps to do two things (for us). For one...having your keywords in the URL is the best way to shoot to the top of a search engine. Also when promoting your warez at events...it is nice to be able to go to a paintballshow and pass out cards with the URL "paintballshow.com", etc. Lots of things that can be done with this type of system...and it is all based on the same back end which makes for very easy administration!

    Let me know if you need more info.

  7. #7
    You could do that easily in .NET without creating a page. Just put the info like "Content", "Page Title", "URL" etc into different collumns of SQL Server. Then, when a page is requested, check the "URL", lookup in SQL, and then do a Server.Transfer to a template page and populate the template lage with different fields from the Table. Let me know if you need more info. The benefit to this method is only the template file has to exist, and the user is none the wiser
    Joe

    <a href="http://www.ecommerceconversions.com">
    Custom Web Design and E-Commerce Solutions - ECommerceConversions</a>

    Ozone Generators where you can buy an ozone generator or ozone machine

  8. #8
    Senior Member
    Join Date
    Apr 2004
    Posts
    446
    Or instead of having to pay for stuff, just do the same thing in PHP and MySQL. ;)

    Yes, it can be done. I once did 4000 video store websites, each with their own database of 50,000 movies (they all started off with the same batch of movies) and I used their 10-digit phone number as the identifier. Part of a project proposal I was involved in.

  9. #9
    Junior Member
    Join Date
    Jun 2004
    Posts
    6

    Another way...

    I have a site that does somthing similar (www.searchBath.com). Its a single site with one sub directory to hold images.

    If a visitor to the site requests say www.searchbath.com/appydaze then it generates a "404" error. But within IIS I redirected http:404 errors to a web page that searches an SQL table, finds appydaze and displays the appropriate files.

    Its not a fast site - its not meant to be - its my code playground!

  10. #10
    Junior Member
    Join Date
    Jun 2004
    Posts
    6

    Another way...

    I have a site that does somthing similar (www.searchBath.com). Its a single site with one sub directory to hold images.

    If a visitor to the site requests say www.searchbath.com/appydaze then it generates a "404" error. But within IIS I redirected http:404 errors to a web page that searches an SQL table, finds appydaze and displays the appropriate files.

    Its not a fast site - its not meant to be - its my code playground!

Similar Threads

  1. Template Websites, how does google rank them
    By frosty in forum Google Discussion Forum
    Replies: 2
    Last Post: 02-28-2007, 09:13 AM
  2. convert old template to new template
    By watto in forum Graphics & Design Discussion Forum
    Replies: 5
    Last Post: 04-21-2006, 06:13 PM
  3. comparison - custom websites vs. template websites
    By brianzajac in forum Graphics & Design Discussion Forum
    Replies: 4
    Last Post: 07-24-2005, 04:25 PM
  4. Dynamic template websites
    By MtraX in forum Web Programming Discussion Forum
    Replies: 6
    Last Post: 11-02-2004, 03:46 AM
  5. PR6 web design company for exchange with template websites
    By leandroaliaj in forum Marketing Strategies Discussion Forum
    Replies: 1
    Last Post: 10-09-2004, 02:53 AM

Posting Permissions

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