, but something causes a loop when trying to bring up the blog. Is that what you see?
Just to check, you have some primary domain, and ingeniumcr.com is an add-on domain, with a root directory of
. Correct?
Your
public_html/.htaccess has problems.
RewriteEngine on
RewriteCond %{HTTP_HOST} ^.*$
RewriteRule ^saborio/?$ "http\:\/\/www\.ingeniumcr\.com" [R=301,L]The RewriteCond matches
any host, so it's not really doing anything and can be omitted. Is this "saborio" directory under
public_html/, and not
public_html/ingeniumcr/? Is this redirection a separate issue from adding www. to ingeniumcr.com and the blog problem? The RewriteRule pattern (
^saborio/?$) will match
only ...primarydomain.com/
saborio or ...primarydomain.com/
saborio/. Are you deliberately trying to match only those two cases, and not any pages under that directory (e.g., ...primarydomain.com/saborio/index.php will not be matched). If you change the pattern to
^saborio/?(.*)$ you will match anything beyond just that directory, and can transfer it to the target with
$1 (if that's what you're trying to do). Finally, it is unnecessary to escape characters in the target. This is just text to be substituted, not a pattern to match, so you want
http://www.ingeniumcr.com (without the " quotes, too). If you omitted the RewriteCond, you can get rid of the
L flag too.
If you want just ...primarydomain.com/saborio and ...primarydomain.com/saborio/ to be redirected to
www.ingeniumcr.com, you would do:
RewriteEngine On
RewriteRule ^saborio/?$ http://www.ingeniumcr.com [R=301]If you want to preserve the path and file information,
RewriteEngine On
RewriteRule ^saborio/?(.*)$ http://www.ingeniumcr.com/$1 [R=301]should work. Or at least, it would work if ingeniumcr.com was your primary domain. Depending on the exact server configuration, it may have trouble redirecting to an add-on domain. In that case, you could try
RewriteEngine On
RewriteRule ^saborio/?(.*)$ /ingeniumcr/$1 [R=301]and let the other
.htaccess file take care of the domain name.
Your
public_html/ingeniumcr/.htaccess file looks like it should work:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^ingeniumcr\.com [NC]
RewriteRule ^(.*)$ http://www.ingeniumcr.com/$1 [R=301,L]It should match a host name of exactly
ingeniumcr.com and redirect it to the www form. That seems to work.
The question is why does your blog go into a loop? ingeniumcr.com -->
www.ingeniumcr.com and back in an endless loop. Is there a further
.htaccess file deeper down? Maybe in
public_html/ingeniumcr/resources/wordpress/.htaccess? Have you confirmed that there are no other
.htaccess files (installed by Wordpress)? That's all I can think of... that maybe there's another
.htaccess file that's redirecting you back from
www.ingeniumcr.com to ingeniumcr.com.
If there are no additional
.htaccess files, you might try the following. Erase or hide
public_html/ingeniumcr/.htaccess. In
public_html/.htaccess:
RewriteEngine On
# assume standard Lunarpages setup of add-on domain coming in as primarydomain.com/addon_dir/
# redirect references to saborio to ingeniumcr.com
RewriteRule ^saborio/?(.*)$ /ingeniumcr/$1 [NC]
# give ingeniumcr.com its proper name
# assuming at this point it's primarydomain.com/ingeniumcr/...
RewriteRule ^ingeniumcr http://www.ingeniumcr.com/$1 [NC,R=301]Let us know how it turns out, and which method you had to use. Don't forget to clear your browser cache after any change to
.htaccess.