Status
Not open for further replies.

Toiletroll

New Member
I have just installed isapi_rwl_x86_0072.msi on my server.

I then went to start -> ISAPI rewrite -> httpd.ini

Then I saved the httpd.ini file to the root directory of my website and it looks identical to this except for "mysite" being replaced by the site I am working on, all other syntax is in the ini file:

[ISAPI_Rewrite]

# Defend your computer from some worm attacks
RewriteRule .*(?:global.asa|default.ida|root.exe|..).* . [F,I,O]

RewriteCond Host: ^mysite.ie
RewriteRule (.*) http://www.mysite.ie$1 [I,RP]

Basically, what have I done wrong? :)

Thanks in advance
 

mneylon

Administrator
Staff member
You haven't said what happens
 

Forbairt

Teaching / Designing / Developing
do you have a local dev server you can test / break things with (would be my first suggestion)
 

Toiletroll

New Member
do you have a local dev server you can test / break things with (would be my first suggestion)

No but I have a very good backup service on the go which I can just click into action should I break anything :)

Anyway, these changes can be easily reversed :)

Why is my page not redirecting with what I've done? :)
 

Forbairt

Teaching / Designing / Developing
Hmm... yes :) So I must be stupid :)

I am using ISAPI lite - should be ok?

really I asked about a local dev server so that you can really blow up things

is any form of redirect working at all ? (as in can you actually break things by including crap in that file) ?
 

Toiletroll

New Member
I changed it to this:

[ISAPI_Rewrite]

rejoin.eejit.breakme

# Defend your computer from some worm attacks
RewriteRule .*(?:global.asa|default.ida|root.exe|..).* . [F,I,O]

RewriteCond Host: ^mysite.ie
RewriteRule (.*) http://www.mysite.ie$1 [I,RP]

and it didnt seem to break anything
 

Toiletroll

New Member
hence we could go into your rewrite rules ... but it doesn't look like you've actually configured the system correctly yet so ... (documentation)

What if I put this code in my .NET webpages?

<script language="c#" runat="server">
private void Page_Load(object sender, System.EventArgs e)

{

Response.Status = "301 Moved Permanently";

Response.AddHeader("Location","http://www.new-url.com");

}

</script>
 

Toiletroll

New Member
For anyone trying to set up a 301 re-direct and want to do it the easiest way in IIS. You can simply create a 2nd site call it something like non-www-mysite and set it to be a redirect. Then change its host header to http://mysite.com then go into your main site and change host header to http://www.mysite.com

:)

Simple overall re-direct.

I got better grade reports on my site already :)
 
Status
Not open for further replies.
Top