Koozali.org: home of the SME Server
Contribs.org Forums => General Discussion => Topic started by: guest1618 on September 27, 2009, 10:28:23 PM
-
Hello,
I have gone through the archive and found several threads for setting up 301 Redirects but none of them have worked. I'm trying to make domain.com redirect to www.domain.com. i have tried .htaccess files with the following:
redirect 301 /html/index.html http://www.domain.com/index.html
another with:
Options+FollowSymlinks
RewriteEngine on
rewritecond %{http_host} ^domain.com [nc]
rewriterule ^(.*)$ http://www.domain.com/$1 [r=301,nc]
I have tried to use the custom template mechanism with both also without success. I do have domains with .htaccess security working using the template system. Pointers would be appreciated.
-
I never had any success with creating custom template, I know that the developers have told me in the past that I can put exactly same thing in Custom template as I do into .htaccess file, but I could never get it to work. When I created custom template, nobody could get access to the site, but when I copied exactly the same information into .htaccess file, everything worked fine. So now I don't even bother with custom template any more, I just use .htaccess file.
In order for the .htaccess file to function properly with simlinks, you have to issue the following command:
db accounts setprop ibayname FollowSymLinks enabled
db accounts setprop ibayname AllowOverride All
signal-event ibay-modify ibayname
Replace the ibayname with name of the ibay where domain.com is located