-
Apprentice
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
-
-
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
-
Re: Website creation (Hosted in Apache, Ubuntu)
use mod_rewrite , that will do it :)
-
Apprentice
Re: Website creation (Hosted in Apache, Ubuntu)
Can you both do an example?? I dont really understood.
-
Re: Website creation (Hosted in Apache, Ubuntu)
-
Re: Website creation (Hosted in Apache, Ubuntu)
-
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.