Hi guys,

I made a site locally in Drupal 6.26 and a few days ago I have transfer it to my hosting account using the exact steps from here: http://drupal.org/node/333675

Into my hosting account the root for my primary domain is public_html but my site is in public_html/domainname, and I have the following problems:

1. The URL always appear like domain.ro/domain and all content on my site appear like domain.ro/domain/content
2. The modules in sites/domainname/modules are not detected by drupal.

For (1) I did the following:
Initially if I’ve typed domain.ro nothing appeared and had to type domain.ro/domain to show my site, but after some lines in .htaccess I succeded to show the site at domain.ro although when I click the home page or any other menu the url structure domain.ro/domain/content appear again.

The code in my .htaccess is:

RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www.)?domain.ro$
RewriteCond %{REQUEST_URI} !^/domain
RewriteRule ^(.*)$ domain/$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L]

I’ve uncomment settings.php $base_url to domain.ro but nothing happened.

Can I make something with .htaccess so that the URL structure be normal (domain.ro and domain.ro/content)?

For (2) I didn’t find anything for now.

Any help appreciated.

Comments

pelleas’s picture

Found the answers to my questions.

For no. 1 I write the following code in my .htaccess

RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www.)?domain.com$ [NC]
RewriteCond %{REQUEST_URI} !^/subfolder/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /subfolder/$1
RewriteCond %{HTTP_HOST} ^(www.)?subfolder.ro$ [NC]
RewriteRule ^(/)?$ subfolder/index.php [L]

And for no.2 a renamed my folder in sites/domain to sites/domain.com

I hope this will help someone.