Hi everyone!

My site is hosted on a Bluehost, and I have a problem with this module.
In order to point primary domain to a sub-directory, I created .htaccess file in the root directory.

Options -Indexes

RewriteEngine on

# For security reasons, Option followsymlinks cannot be overridden.
# Options +FollowSymLinks
Options +SymLinksIfOwnerMatch

RewriteCond %{HTTP_HOST} ^yourmaindomain\.com$ [NC]
RewriteRule ^(.*)$ http://www.yourmaindomain.com/$1 [L,R=301]

RewriteCond %{HTTP_HOST} ^www\.yourmaindomain\.com$ [NC]
RewriteRule ^$ subdirectory/index.php [L]
RewriteCond %{HTTP_HOST} ^\yourmaindomain\.com$ [NC]
RewriteRule ^$ subdirectory/index.php [L]
RewriteCond %{HTTP_HOST} ^www\.yourmaindomain\.com$ [NC]
RewriteCond %{DOCUMENT_ROOT}/subdirectory%{REQUEST_URI} -f
RewriteRule .* subdirectory/$0 [L]
RewriteCond %{HTTP_HOST} ^www\.yourmaindomain\.com$ [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* subdirectory/index.php?q=$0 [QSA]

Also I uncomment $base_url = 'http://www.yourmaindomain.com';
Everything is working except redirects don't occur...

I tried to come back to the setup where my address would be: www.yourdomain.com/drupal
(deleted the .htaccess I created above), and redirects work fine!

Please help! I can't launch the site because of this issue!
Thanks!

Comments

summit’s picture

Hi,

I have I think the same.
I try this module on a root domain: www.mysite.com and then the redirect works.
But when I try the module on a subdomain (because my provider has installed it this way), than the redirect doesn;t work.
Say for instance domain www.mysite.com/de then the redirect doesn;t work.

Would love to have the redirect module working for subdomains also!

Thanks a lot in advance for your reply!
Greetings, Martijn

darthf1’s picture

darthf1’s picture

pere orga’s picture

Issue summary: View changes
Status: Active » Closed (duplicate)
pere orga’s picture