Our website is made possible by displaying online advertisements to our visitors.
Please consider supporting us by disabling your ad blocker.
-
.htm ?
Hello you lot,
I'm making a website for the band but on pages it says: www.brokenmachine.co.uk/gigs.htm
(not online yet though)
how can i make the webpage www.brokenmachine.co.uk/gigs without the extension code bit?
Thank You.
-
Web Guru
The easy way is to name the page in question index.htm, and place it in a folder at www.brokenmachine.co.uk/gigs/
The more complicated way would be using mod rewrite and htaccess to serve the correct page. See http://newmediarts.blogspot.com/2007...urls-with.html for a pointer.
P.S. It's a good idea to register your domain before posting anything like this, as there are people around who would register it before you do....
Last edited by Marc J; 04-08-2008 at 02:42 PM.
Reason: Added PS
-
The first one seems simple but what do you mean?
Sorry
-
Web Guru
Originally Posted by
brokenmachine
The first one seems simple but what do you mean?
Sorry
Your website can have a folder (or directory) structure just like files on your PC. In a website, there are default files which will show if no filename is used, for example typing www.brokenmachine.co.uk will actually show the file www.brokenmachine.co.uk/index.htm as index.htm is almost always included in the default file list on the server. FYI this list is usually something like: -
index.html
index.shtml
index.php
index.htm
default.html
Default.htm
default.html
Default.html
default.shtml
Default.shtml
page1.html
index.pl
index.cgi
index.php3
index.phtml
home.htm
home.html
home.shtml
index.wml
Although not particularly in that order. What this means is that when the server gets a request for a folder but no file name, it will look for the above files and display the first match it finds. There are ways to customise this default file list using htaccess but you probably don't want to go there....
So, if you have gigs.htm and you want it to display without the .htm, you rename it index.htm and put it in the \gigs\ folder.
-
Thanks, I think thats cleared that up, so my file directory will be like this?:
Broken Machine - Template folder
gig - folder\ gig.htm
music - folder\ ---
video - folder\ ---
Is this correct and if so i will just need to type in: www.brokenmachine.co.uk/gig and that webpage will load up?
And is this what I could use for .htaccess if I sometime in the future need to: www.htaccesseditor.com/en.shtml#a_redirect
-
Web Guru
Originally Posted by
brokenmachine
Thanks, I think thats cleared that up, so my file directory will be like this?:
Broken Machine - Template folder
gig - folder\ gig.htm
music - folder\ ---
video - folder\ ---
Is this correct and if so i will just need to type in:
www.brokenmachine.co.uk/gig and that webpage will load up?
No, it'll be like this: -
Broken Machine - Template folder
gig - folder\ index.htm
music - folder\ index.htm
video - folder\ index.htm
No, I wouldn't use that.
-
So with that file structure when someone for example types in: www.brokenmachine.co.uk/gig it will load the gig page and for the other pages as well? /music etc etc
-
Web Guru
Originally Posted by
brokenmachine
So with that file structure when someone for example types in:
www.brokenmachine.co.uk/gig it will load the gig page and for the other pages as well? /music etc etc
Yes, should do. Just remember to code the pages correctly as links between the pages would have to reflect the directory structure, for example a link from the music page to the gig page would look something like: -
<a href="../gig/index.htm">click here to go to the Gig page</a>
The ../gig/ part meaning "go back one, then into the gig directory".
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules