My htaccess file contains this

```
Options +FollowSymLinks

RewriteEngine On

RewriteCond %{SCRIPT_FILENAME} !-d
RewriteCond %{SCRIPT_FILENAME} !-f

RewriteRule ^.*$ ./index.php

```

this redirects all requests to my index.php page, which includes different files as required. That file brakes the url on the basis of `/` and gives output as an array.

`$request = split("/", $request);`

If someone accesses `mywork/yash` , the query works fine as `$request[0]` becomes `yash`. But when I program for `$request[1]` it gives a `undefined offset` error.

I know this error arises when an array index which is undefined is accessed, but when `mywork/yash/` is acccessed, the error doesn't occur anymore !.

Can someone tell me the `.htaccess` rule to add a tail-ending slash after every request so as soon as the user types `mywork/yash` it gets converted to `mywork/yash/`.

Thanks in advance !