Hello all,

I created a folder with a redirect function, so the users do not need to learn a long login link.

The folder name is /login and it is located on the domain's root folder.

When users go through the main domain it works like a charm:

If they enter:
www.domain.com/login
They are redirected to:
www.domain.com/index.php?option=com_user&view=login

which is what I want.

-------BUT

When they go through a subdomain:
subdomain.domain.com/login
They are redirected to:
http://www.index.php/?option=com_user&view=login


I do not understand this difference!

Here is the syntax of the function:

<?php
header('Location: ' . dirname(dirname($_SERVER['PHP_SELF'])) . '/index.php?option=com_user&view=login');


Any ideas?

Thank you all!