Move Drupal to subdirectory - clean urls There is a requirement to move  site from www.test.com and make it available only under URL www.test.com/newsite.

When the clean URLs are enabled and after i click to login to the administration site, the URL changes to:    www.test.com/newsite/newsite/user.It duplicates the "newsite".

The page  www.test.com/newsite/user is visible...and only after the login attemp this happens.

I have set in .htacess

RewriteBase /newsite
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]


Clean URls are working normally in the rest of the site.
Perhaps setting the $base_url variable in the settings.php will help Drupal generate the correct urls.

/**
     * Base URL (optional).
     *
     * If Drupal is generating incorrect URLs on your site, which could
     * be in HTML headers (links to CSS and JS files) or visible links on pages
     * (such as in menus), uncomment the Base URL statement below (remove the
     * leading hash sign) and fill in the absolute URL to your Drupal installation.
     *
     * You might also want to force users to use a given domain.
     * See the .htaccess file for more information.
     *
     * Examples:
     *   $base_url = 'http://www.example.com';
     *   $base_url = 'http://www.example.com:8888';
     *   $base_url = 'http://www.example.com/drupal';
     *   $base_url = 'https://www.example.com:8888/drupal';
     *
     * It is not allowed to have a trailing slash; Drupal will add it
     * for you.
     */
    # $base_url = 'http://www.example.com';  // NO trailing slash!