Question: I want to create a link which is catched by **$\_GET** in PHP. Let me explain:

Currently i do this in **HTML**:

```
<a href="?contactus">Contact Us</a>

```

And this is what i do in **php**:

```
<?php
    if (isset($_GET['contactus'])){
        include "contactus.php";
    }
?>

```

In this case the address becomes like this `www.domain.com/?contactus`.

But I want the address like this: `www.domain.com/contactus`

If i change html to `<a href="contactus">Contact Us</a>`
but it doesn't work. Anyone please tell me. Thanks

Answer: 
You can use domain.com/contactus and parse the URL

```
$url = "http://domain.com/contactus";
$url = parse_url($url);
$path = $url['path']; // contactus
echo $path;  // contactus

```

You can then use it

```
 if ($path == "contactus"){
       include "contactus.php";
    }

```

You will still need URL rewrite, try adding or editing your .htaccess file

```
RewriteEngine On    # Turn on the rewriting engine
RewriteRule    ^contactus/?$    contactus-page.php    [NC,L]    # Handle requests for "contactus"

```
hi you need to do like this
at page where u set anchor tag do following 
$url="contact.php?page"='contactus'; 
give href="$url" .

And other side you can use `$urlget = $_GET['page'];`

plz note the attribute u used is page so when u try to get in nother page u need to use `$_GET['page']` and you can see url when you click on contact us page in your address bar there is also contact.php?page='contactus' showing