URL rewrite in IIS7: make foo.com/bah/ redirect to example.com/foo/bah/
February 10, 2009 12:10 PM
Subscribe
Help me with a URL rewrite in IIS7
I want to implement a rewrite in IIS that would allow the following without having to create a new rule for each one.
www.foo.com/books/ redirects to www.example.com/foo/books/
www.foo.com/films/ redirects to www.example.com/foo/films/
www.foo.com/etc/ redirects to www.example.com/foo/etc/
www.foo.com/etc/etc/ redirects to www.example.com/foo/etc/etc/
I am familiar with the steps in
using url rewrite module in IIS7 if that makes passing on instructions a bit easier.
posted by furtive to computers & internet (3 comments total)
RewriteCond %{HTTP_HOST} ^www.foo.com$ [NC]RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,L]
posted by Blazecock Pileon at 12:47 PM on February 10