Rewrite and subdomains

Topics: Developer Forum, User Forum
Nov 5, 2012 at 9:19 PM

Hi Guys! for SEO purposes I want to eliminate the subdomain blog. I cannot do it from the site, so I'm giving a try with IIRF. My idea es to have to show (not redirect).

I also want a redirect from to

If the URI is then do nothing. I think I got that running.

Now, if the URI is (or any other page) I'm getting /blog/blog in the rewrite and getting an error. What I dont know  how to do is to do rewrite to /blog if the orginal is (no trailing path) and if the URI has a path, to reserve it.

I'de appreciate any suggestions

here is my iirf.ini:

RewriteCond %{HTTP_HOST} [NC]

RewriteCond %{HTTP_VIA} ^$  [NC] [OR]

RewriteCond %{HTTP_URL} !/intranet/[OR]

RewriteCond %{HTTP_URL} !/blog/

RedirectRule ^(.*)$$1  [R=301]

RewriteCond %{HTTP_HOST}   ^domain\.net$  [I]

RewriteCond %{HTTP_URL} /blog

ProxyPass ^(.*)$$1 [U,I]