tags:

views:

135

answers:

3

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?.

+2  A: 

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.

Cheeso
Thank you very much. It works.
+1  A: 

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:

  1. Create an empty index.html page
  2. Right click on that page in IIS and open the Properties dialog
  3. On the File tab, select "A redirection to a URL"
  4. Change the "Redirect to" value to http://www.mydomain.net/blog
  5. Check the "A permanent redirection for this resource" checkbox
Jason
A: 

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]
TonyCool