I've just copied my drupal website from local to server, everything is fine except the url of the site is http://www.mydrupalsite.com/mydrupalsite.com/index.php (although there is no folder named mydrupalsite.com)
The server directories and files are like this:
- root
- .htaccess
- mydrupalsite.com
- index.php
- other drupal files...
- .htaccess (drupal one)
- myothersite.com
- ...
I don't think the root htaccess file has something to do with it, because myothersite.com has no problems with it. Is it possible that the .htaccess file of the drupal is causing it? If so, how to prevent it?
I made some changes and tried this in root .htaccess, but it still doesn't work:
RewriteEngine on
RewriteOptions MaxRedirects=2
RewriteCond %{HTTP_HOST} ^([a-zA-Z0-9]+).([a-zA-Z0-9-]+).([a-zA-Z]+)$
RewriteCond %{QUERY_STRING} !^(.*)redirect=1(.*)$ [NC]
RewriteRule ^(.*)$ /%2.%3/$1?redirect=1&%{QUERY_STRING}
To sum it up, I found out that this structure has been created by previous admin and should not be changed (as there are two domains). I guess the problem could be solved by removing the /mydrupalsite.com/ when present in url with .htaccess somehow, but finally I've been said it does not matter, so I left it as it is.
$base_url
defined in there? If so, set it to a blank string;)
:)
Anyway, I was not serious, before: Effectively, it was too early to answer to this question. Basing on the answer I get on my question here, users can decide on which answer better suits this question.