1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

How to delete the html?

Discussion in 'HTML & Website Design' started by wptheme, Dec 8, 2008.

  1. #1
    Hi, I want to ask how do I change my html website
    example:
    domain.com/test.html
    to
    domain.com/test

    Thanks
     
    wptheme, Dec 8, 2008 IP
  2. mahendras

    mahendras Peon

    Messages:
    597
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #2
    you can do this trick

    create a folder called "test" in your website root.
    and then in you should put your file name as index.html.
    so when you access domain.com/test ... it will work ( browser will open domain.com/test/index.html automatically)
     
    mahendras, Dec 8, 2008 IP
    wptheme likes this.
  3. cheapez

    cheapez Active Member

    Messages:
    1,123
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    78
    #3
    You can use "mod rewrite" to redirect it, people call it "friendly urls".
    Or simple like mahendras said, create a folder "test" in your "root" then rename test.html to index.html and put it in that folder.
     
    cheapez, Dec 8, 2008 IP
    wptheme likes this.
  4. babyLEO

    babyLEO Peon

    Messages:
    42
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    The above said process will do what you want
     
    babyLEO, Dec 8, 2008 IP
  5. KlaxoN

    KlaxoN Peon

    Messages:
    41
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #5
    "Mod rewrite" method will be safer and cleaner.
    Don't waste your time for archaic methods like that above with folder...
     
    KlaxoN, Dec 8, 2008 IP
    wptheme likes this.
  6. dejangex

    dejangex Peon

    Messages:
    113
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #6
    If you are using apache do the following:

    1. Create a file called ".htaccess" in the same folder where your file is
    2. Put the following text in it

    RewriteEngine on
    RewriteRule ^test(/)?$ test.html
    Code (markup):
    Thats all.
     
    dejangex, Dec 8, 2008 IP
    wptheme likes this.
  7. soccer05

    soccer05 Peon

    Messages:
    11
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    yeah i do that too
     
    soccer05, Dec 8, 2008 IP
  8. wptheme

    wptheme Well-Known Member

    Messages:
    4,051
    Likes Received:
    346
    Best Answers:
    0
    Trophy Points:
    180
    #8
    Emm..Thanks guys. Really cool method. But whats the difference and which i better? repped to ideas giver.
     
    wptheme, Dec 8, 2008 IP
  9. wptheme

    wptheme Well-Known Member

    Messages:
    4,051
    Likes Received:
    346
    Best Answers:
    0
    Trophy Points:
    180
    #9
    Ok done. thanks. also need to know why did my site have different results for
    domain.com/test/
    with
    domain.com/test
    Anyone can tell me that?
     
    wptheme, Dec 8, 2008 IP
  10. dejangex

    dejangex Peon

    Messages:
    113
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #10
    Hmm, thats very strange. There should be no problem because there is the "(/)?" which basically tells it with or without the backslash.

    Ahh, but perhaps I know what is your problem. The page "thinks" that it it inside a folder called test, and because you use relative positions with images and other included files, it looks for those files in the folder test, which does not exist.

    Just add this to your html <head> tag:

    <base href="http://www.domain.com" />
    Code (markup):
    This will tell the page where its located, effectively re-anchoring it.
     
    dejangex, Dec 9, 2008 IP
  11. shilpamg

    shilpamg Peon

    Messages:
    228
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #11
    this is the right way.
    you can change you website html file name with this method.
     
    shilpamg, Dec 9, 2008 IP
  12. wptheme

    wptheme Well-Known Member

    Messages:
    4,051
    Likes Received:
    346
    Best Answers:
    0
    Trophy Points:
    180
    #12
    Well see my site for yourself.
    madaerahdotorg/news
    different with
    madaerahdotorg/news/

    With / makes it without the css. I think. :(
    Help~~ :p
     
    wptheme, Dec 9, 2008 IP
  13. dejangex

    dejangex Peon

    Messages:
    113
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #13
    Put it in the <head>, it will fix the problem:
    
    
    [B]<base href="http://madaerah.org" />[/B]
    
    [I]<meta content="Ma' Daerah Turtle Sanctuary" name="description">
    </head>[/I]
    
    
    Code (markup):
     
    dejangex, Dec 9, 2008 IP
  14. wptheme

    wptheme Well-Known Member

    Messages:
    4,051
    Likes Received:
    346
    Best Answers:
    0
    Trophy Points:
    180
    #14
    Ok. will try this. Thanks repped+
     
    wptheme, Dec 9, 2008 IP