Website creation (Hosted in Apache, Ubuntu)

Results 1 to 7 of 7
  1. #1
    Apprentice R@LM is offline
    MemberRank
    May 2010 Join Date
    11Posts

    Website creation (Hosted in Apache, Ubuntu)

    Hi all,

    Im creating an website ( at the momment at home) and Im with some problems that I just dont know to fix them. And after seaching for 2 hours, I though why not ask.

    Here is what I want to do:

    This is all an example, So I have the main domain www.site.com and I have sub-pages, for example galery, news...
    All that sub-pages have their own folder. So what happends when I access it is this.

    www.site.com/sub1/galery.html

    Behing Sub1 the folder that I want to hide.

    to get this:

    www.site.com/galery.html

    Anyone can help me?

    Note:
    Im using Ubuntu 10.10 with Apache2 and PhP5


  2. #2
    Resurrected Jam32 is offline
    MemberRank
    Aug 2008 Join Date
    JamoniaLocation
    2,393Posts

    Re: Website creation (Hosted in Apache, Ubuntu)

    You could create gallery.php and then "include" it from sub1,so it would be

    Site.com/gallery.php

  3. #3
    ...[ White Rabbit ]... MentaL is offline
      Administrator  Rank
    Jan 2001 Join Date
    31,753Posts

    Re: Website creation (Hosted in Apache, Ubuntu)

    use mod_rewrite , that will do it :)

  4. #4
    Apprentice R@LM is offline
    MemberRank
    May 2010 Join Date
    11Posts

    Re: Website creation (Hosted in Apache, Ubuntu)

    Can you both do an example?? I dont really understood.

  5. #5
    Resurrected Jam32 is offline
    MemberRank
    Aug 2008 Join Date
    JamoniaLocation
    2,393Posts

    Re: Website creation (Hosted in Apache, Ubuntu)


  6. #6
    ...[ White Rabbit ]... MentaL is offline
      Administrator  Rank
    Jan 2001 Join Date
    31,753Posts

    Re: Website creation (Hosted in Apache, Ubuntu)


  7. #7
    Gamma 404 is offline
    MemberRank
    Jul 2007 Join Date
    3,143Posts

    Re: Website creation (Hosted in Apache, Ubuntu)

    If you want to shorten your URL or hide the directory, you probably better off with either iframe or include. Mod rewrite is not for beginners.

    Since your pages got different folders, rename each page to index.html/php , so that when you go site.com/gallery , it will open site.com/gallery/index.html or index.php as long as the page is named index.html /php , all you have to do is to point it to a folder/directory (;

    Might be confusing, but its hard to explain.



Advertisement