Hi, I want to ask how do I change my html website example: domain.com/test.html to domain.com/test Thanks
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)
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.
"Mod rewrite" method will be safer and cleaner. Don't waste your time for archaic methods like that above with folder...
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.
Emm..Thanks guys. Really cool method. But whats the difference and which i better? repped to ideas giver.
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?
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.
Well see my site for yourself. madaerahdotorg/news different with madaerahdotorg/news/ With / makes it without the css. I think. Help~~
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):