Hello
I'm using 'Ionics Isapi Rewrite Filter'
I have a web site with a empty root www.mydomain.net and I want, when someone use this url, redirect to my blog www.mydomain.net/blog, how is it possible?.
Hello
I'm using 'Ionics Isapi Rewrite Filter'
I have a web site with a empty root www.mydomain.net and I want, when someone use this url, redirect to my blog www.mydomain.net/blog, how is it possible?.
You don't need a rewriter to do REDIRECT.
You can do that with a default document (like, say, index.html) in the docroot, with a Meta Refresh tag in it.
The content of index.html might be like this:
<META HTTP-EQUIV=Refresh CONTENT="0; URL=blog">
Now if you actually want a REWRITE, that is different.
I'm going to assume that since you're using the Isapi Rewrite filter that you're running on IIS (this answer works for other servers but my instructions are specifically for IIS). You really don't want to use meta refresh and for SEO purposes you want to use a permanent (301) redirect instead.
In IIS you do this by:
Here's the solution for ISAPI_Rewrite 3 Lite (which is free):
RewriteBase /
RewriteCond %{HTTP_HOST ^www\.mydomain\.net$ [NC]
RewriteRule ^$ /blog [NC,R=301,L]