Forum Moderators: open
I would like a 301 redirect rule that checks the requesting domain, similar to the following .htaccess I have running on an apache server.
RewriteCond %{HTTP_HOST}!^www\.domain\.net
RewriteRule (.*) [www....] domain.net/$1 [R=301,L]
The issue I have is that the server I am using on this domain is IIS alongside Tomcat as the application server. And I do not think I can use this .htaccess? Reading over IIS documentation it talks about the IIS admin panel and adding an entry for each domain I wish to redirect to the main one. Is there a better solution, that would just redirect any incoming domain to the main one without having to a) remember all the incoming domains b)cover any domains that someone else might direct to the site etc.
TIA,
-Gs
[edited by: Alternative_Future at 12:09 pm (utc) on Oct. 26, 2006]
But it does not work. I can confirm that isapi is working as the URL rewriting works fine.
-gs
Why is it everyone is 301ing with modrewrite? Why not go into .htaccess and put:
301 redirect /old.html [new-site...]
?
Does this not return 301 in the header?