Some IIS configuration help!

  • Thread starter Thread starter Xon
  • Start date Start date

Xon

Xon

Associate
Joined
18 Oct 2002
Posts
1,056
Location
Malta
Hi all,

I need some help with redirection on IIS and was wondering if any of you know how to set this up:

This is what is needed:
The URLs beneath need to be redirected to http://www.x.y.com/the-name-of-the-file-in-question.aspx
Furthermore if aspx file is followed by ?LanguageCode=FRE the user needs to be redirected to http://fr.x.y.com/the-name-of-the-file-in-question.aspx (Note the fr.)

Currently the www.y.com/name-of-the-file.aspx is redirecting to the proper page but urls that do not include www. are simply redirected to homepage.

Can this be done on server side like it would be done with htaccess?

http://y.com/name-of-the-file.aspx

What I've done so far is add $S$Q to the redirect and that has solved half the above mentioned requirement but obviously not the part pertaining to the LanguageCode. Any genius available?
 
Hmm, I use a mixture, but the easiest way to redirect in IIS is to go into the IIS manager, find the website, find the folder you want to redirect, properties, directory tab, put in a redirect url in the box provided.

That would only solve your first problem.

The aspx language code one, you will probably have to use htaccess, although htaccess only works on IIS with ISAPI rewrite. I don't know if you might be able to code the redirect into the pages? It would have to be sitewide. There is an ASP redirect on this page: http://www.webconfs.com/how-to-redirect-a-webpage.php
 
If this is in IIS7 you can use regular expressions in the URL rewrite module. This should mean you only need 2 rules - one for the redirect from y.com to x.y.com, and one for ?languagcode=FRE to the other URL.
 
If this is in IIS7 you can use regular expressions in the URL rewrite module. This should mean you only need 2 rules - one for the redirect from y.com to x.y.com, and one for ?languagcode=FRE to the other URL.

It's IIS7. That's the first time I'm hearing about URL rewrite and it sounds promising.

So I'm guessing it would have to be an Inbound rule... will look it up to understand how exactly it works. Any tips would be appreciated.
 
Ok it's doing my head in and not working :( Any help?

I really should stick to networking!
 
I had a problem with URL Rewrite module in IIS7.5 when i installed it. I had to go into Control Panel > Programs and Features and do a repair on it.

Yeh you need to create an inbound rule. URL Rewrite then writes the rule to the web.config file in the web root.
 
Back
Top Bottom