Make it work if WordPress installed in a subdirectory

This should work even if WordPress is installed in a subdirectory. With the `$request` method, for `http://example.com/wp/author/mike` the `$request` is `/wp/author/mike` so `stripos` result is not 0.

Here I suggest to use `get_query_var()` instead of `$request`.