Results 1 to 3 of 3

Thread: HTML/Website building question

  1. #1
    Gold Member Marcos's Avatar
    Join Date
    Sep 2004
    Location
    England
    Posts
    4,119
    Thanks
    54
    Thanked
    26 times in 17 posts

    HTML/Website building question

    Hello

    i have a quick question, you know how some websites have a link that looks like:

    bbc.co.uk/radio1

    where the end of it does not point to a page, it points to a directory but still takes you to a specific page. How do you do that?

    because right the page i want people to see is at

    http://www.marcosmoreno.org/design/home.html

    But i'd like them to only have to type

    http://www.marcosmoreno.org/design

    to get there, but right now that takes them to the dirctory

  2. #2
    Gaarrrrr! Dav0s's Avatar
    Join Date
    Aug 2005
    Location
    Bristol
    Posts
    1,442
    Thanks
    1
    Thanked
    3 times in 3 posts
    rename home.html to index.html

  3. #3
    Ah, Mrs. Peel! mike_w's Avatar
    Join Date
    Oct 2003
    Location
    Hertfordshire, England
    Posts
    3,326
    Thanks
    3
    Thanked
    9 times in 7 posts
    If you have apache, you use .htaccess to get addresses to point to certain pages.

    e.g.
    Code:
    RewriteRule ^articles/([^/]+)/$       article.php?article=$1
    This means that every time you go to anything with an address that starts with 'articles', following by a slash, followed by any number of characters so long as it is not another slash (this is the bit inside the brackets), and finishing with a slash, you are redirected to article.php?article=$1, where $1 is the bit in the brackets.

    Your case is slightly simpler, since it is a certain address to a certain page i.e.

    Code:
    RewriteRule ^design$     design/home.html
    Using index.html will work as well, but using rewrite allows you to change paths to whatever you like, regardless of directory structure.
    "Well, there was your Uncle Tiberius who died wrapped in cabbage leaves but we assumed that was a freak accident."

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Building my new PC at the moment! Have a quick question.
    By acrobat in forum PC Hardware and Components
    Replies: 32
    Last Post: 22-12-2006, 04:24 AM
  2. Personal Question game.....
    By Kitty in forum General Discussion
    Replies: 394
    Last Post: 29-01-2006, 11:50 AM
  3. Replies: 6
    Last Post: 21-10-2005, 08:50 AM
  4. Quick Question: PSU's with 1x120mm fan question
    By philyau in forum PC Hardware and Components
    Replies: 10
    Last Post: 05-09-2005, 02:30 PM
  5. The 78th Annual Hexus Quiz!
    By Stewart in forum General Discussion
    Replies: 19
    Last Post: 23-01-2005, 02:05 PM

Posting Permissions

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