iGuest 3 Report post Posted October 22, 2012 what is java script for remove extention of webpage from address barlike .html, .php Share this post Link to post Share on other sites
cityzen 1 Report post Posted October 24, 2012 (edited) You can't alter the url in the address bar with Javascript. You have to do it from the server, the '.htaccess' file may help you. If you don't want to deal with difficult codes like Apache and url rewritting use to be, there is simple alternatives like renaming this webpages 'index.php' and put them in folders waring the name you want to show, then you can call just the folder url to see the page, like this one:http://forums.xisto.com/no_longer_exists/ Edited October 24, 2012 by cityzen (see edit history) Share this post Link to post Share on other sites
jlhaslip 4 Report post Posted October 25, 2012 (edited) cityzen,You would still need an index.php file or index.html inside that folder Edited October 25, 2012 by jlhaslip (see edit history) Share this post Link to post Share on other sites
cityzen 1 Report post Posted October 25, 2012 You are right Jhaslip,If I understood well, Guest_Suraj_ doesn't want to show the extension pages in the url of browsers. Instead of having : yourwebsite.com/tag/mypage/ in the address bar, he wants something like: yourwebsite.com/tag/mypage/ If you create a folder called /mypage/ , move there the mypage.php and name it index.php, then you can show something like: yourwebsite.com/tag/mypage/ With a slash.That's a simple way. However, it's good only if you have just a few pages, otherwise I guess that some other methods may be more efficient. Finally Url rewriting isn't that tricky either... Share this post Link to post Share on other sites
mamer 0 Report post Posted February 2, 2013 That's right cityzen. And if you want to do that for the rest of the linked pages within the website then each page will be in a directory with an index.php or index.html in it but would be difficult and counter productive development wise. As for Url rewriting I'm not familiar with it. Maybe you could tell me more about it. Thanks Share this post Link to post Share on other sites