Hi , I have two urls. I have written them below
1.<a href=”index.php?software=ture”>Software</a>
2.<a href=”index.php?contact=ture”>Contact</a>
What i want to do is that I need to remove the file name and .extention from both of the urls. I am using wamp server on windows xp.
My url should be like this in the addressbar,
1.Mydomain/?software=ture.
2.Mydomain/?contact=ture .
I have heared about htaccess. But I don’t know how to do that.
I have witten my full code below.
Please any body help me.HTML Code:[PHP] <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> <style type="text/css"> <!-- .container { margin: auto; width: 960px; } .bg { margin: auto; width: 960px; } .bg .wrapper { background-color: #FFCCFF; } --> </style> </head> <body> <div class="container"> <div class="bg"> <div class="wrapper"> <a href="index.php?page=software">Softwares</a> | <a href="index.php?page2=contact">Contact</a> </div> </div> <?php $software = $_GET['page']; $contact = $_GET['page2']; if($software) { include("software/software.php"); } else if($contact) { include("contact/contact.php"); } ?> </div> </body> </html> [/PHP]
Thanks in advance.![]()


Reply With Quote

Bookmarks