Question: **CODE :**

**.htaccess:**

```
RewriteEngine On  
RewriteRule    ^(.*)/*$    base.php?request=$1    [NC,L]  

```

**base.php**

```
<?php
    echo "this is base.php <br/> and Get Vaiables <br> ";
    print_r($_GET);
?>

```

*for the request:* 

```
localhost/blahblahproject/hello  

```

**EXPECTED RESULT:**

> 
> this is base.php  
> 
>  and Get Vaiables  
> 
>  Array ( [request] => hello )
> 
> 
> 

**Current RESULT:**

> 
> this is base.php  
> 
>  and Get Vaiables  
> 
>  Array ( [request] => base.php )
> 
> 
>

Answer: 
Change your .htaccess rule to this:

```
RewriteEngine On
RewriteBase /

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/?$ /base.php?request=$1 [QSA,L] 

```
If you are interested in the string after the last "/", change your .htaccess file to:

```
RewriteEngine On
RewriteRule ^.*/(.*)$ base.php?request=$1    [NC,L]

```