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
Comment #1
summit commentedHi,
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
Comment #2
darthf1 commentedRelated to #1884622: URL Redirects has stopped working
Comment #3
darthf1 commentedComment #4
pere orgaYes, this is being done in #1198028: Redirects do not work if $_SERVER['SCRIPT_NAME'] does not follow base_path
Comment #5
pere orgaor this one #2167023: Redirects not working when site root is in subfolder