Koozali.org: home of the SME Server

SEO - 301 Redirect

guest1618

SEO - 301 Redirect
« 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.

Offline calisun

  • *
  • 620
  • +0/-1
Re: SEO - 301 Redirect
« Reply #1 on: October 06, 2009, 06:31:25 AM »
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
« Last Edit: October 06, 2009, 06:33:49 AM by calisun »
SME user and community member since 2005.
Want to install Wordpress in iBay of SME Server?
See my step-by-step How-To wiki here:
http://wiki.contribs.org/Wordpress_Multisite