Windows Server Equivalent to Unix Server .htaccess (RewriteEngine, RewriteCond, ReWriteRule)

Hi,

I'm in need of a windows server equivalent to three unix functions ...

The Situation:
I have a windows 2003 server with a dynamic .NET website that displays about 1.200 different working platforms (boom lifts) in 10 different languages -> meaning, there are not 12.000 static HTML files ... no, there's just 1 ASPX file that displays all 1.200 working platforms multiplied by ten languages (12.000 files) dynamicly (database-driven) depending on certain parameters ...

... now, for different reasons (SEO etc.)  I'm changing the entire site structure ... returning to static HTML files ...

... since all working platforms are already in the main search engines (Google, Yahoo, MSN etc. in all languages!) it would be a break to just generate the new site structure and send all already established links to that site to a "site not found" error ...

... what I'm using on my unix servers in those kind of cases are three simple .htacces functions ... in the current case this would look like:

RewriteEngine On
RewriteCond %{HTTP_REFERER} !^.*\.w62.net/.*$ [NC]
ReWriteRule .*\*.aspx$ http://www.w62.net [R,L]

... these three functions would do all I need -> but only on my unix servers!

What I need is an equivalent to the described functions on a Windows 2003 Server (IIS 6.0) ...

I know that on a Windows 2003 Server there's (basicly) no equivalent to the .htaccess options that unix servers are offering ... I've read http://support.microsoft.com/default.aspx?scid=kb;en-us;324064 ... http://www.webhostingchat.com/forum/archive/index.php/t-624 ... http://www.christian-web-masters.com/articles/web_servers__page_1.html ... and many more articles -> all telling me that there's no way of doing what I want to do ...

... it's just -> that I can't believe that I pay five times more for a Windows Server than for a Unix Server and that I'm supposed to accept that -> I have less functionality on Windows Server than on a Unix Server ... ;-))


Best regards,
Raisor


LVL 15
Ralf KlattEmployee in Civil ServiceAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

humeniukCommented:
You are correct that Windows/IIS has nothing quite the same as the mod_rewrite module you refer to above.  However, there is a third-party ISAPI filter that will do the trick for you.  It's called ISAPIrewrite and you can find it here: www.isapirewrite.com.  The bad news - and given your post, I doubt this will come as much of a surprise :) - is that it isn't free, it costs $69.  You can find a cheaper version ($39) here: www.iismods.com/url-rewrite/index.htm, but I've never used it, so I can't really comment on its quality or effectiveness.

Since you would be using this largely for SEO purposes, I would recommend that you read the 'tips' section of the website that refers to 301/permanent redirects - www.seoconsultants.com/windows/isapi/tips.  Remember that a 301 redirect is the only one that will pass on the PR and other SE benefits of the old page to the new page.  As an aside, if you were using mod_rewrite as you mentioned above, your proper syntax for a permanent redirect should be:

RewriteEngine On
RewriteCond %{HTTP_REFERER} !^.*\.w62.net/.*$ [NC]
ReWriteRule .*\*.aspx$ http://www.w62.net [R=301,L]
0
Lee W, MVPTechnology and Business Process AdvisorCommented:
Two other suggestions:

1. Use Apache instead of IIS - If your serving static HTML pages, this should work fine for you.
2. Use NTFS security and enable Basic Authentication, disable Anonymous access.
0
Ralf KlattEmployee in Civil ServiceAuthor Commented:
Hi,

Thanks for both answers!

@leew ... I won't install Apache on my Windows Servers -> I have tested/evaluated this a couple of years ago on one system and Apache was the cause for huge memory leaks on that system ... Anonymous access is nessecary ...

@humeniuk ... I won't pay for a DLL that does just one trick! ... I'll read the article at www.seoconsultants.com/windows/isapi/tips you've provided ... if that doesn't push me to the right direction then I'll see if I can write an ISAPI.DLL on my own -> do you have any sources to programming ISAPI (before I open an additional question in the programming area)? ... as for rewrite syntax -> [R,L] always worked for me! -> what's the impact on using [R=301,L]?


Best regards,
Raisor
0
Cloud Class® Course: MCSA MCSE Windows Server 2012

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

Lee W, MVPTechnology and Business Process AdvisorCommented:
You are aware that they do UPDATE apache, right?

If anonymous access is necessary, adjust file permissions on a per file basis.  or arrange the files in an appropriate manner and put security on some of the sub folders.
0
Ralf KlattEmployee in Civil ServiceAuthor Commented:
Hi,

We're talking about aproximately 25.000 static HTML files -> if I'd manage to ajust 100 files per day on a per file basis it would take 250 days until it's done -> not to mention that about 50 working platforms are changing per month (sold ones have to be taken off -> new ones have to be entered) ...

What I'm currently thinking about is to add a Java function to each aspx file that redirects to a propper html-listing ... and wait for 2 to 4 weeks until all search engines have listed the html files ...


Best regards,
Raisor
0
humeniukCommented:
"if that doesn't push me to the right direction then I'll see if I can write an ISAPI.DLL on my own -> do you have any sources to programming ISAPI (before I open an additional question in the programming area)?"

Sorry to say that I don't, but I'd certainly be interested in hearing how it goes.


"as for rewrite syntax -> [R,L] always worked for me! -> what's the impact on using [R=301,L]?"

A 301 or permanent redirect is the only on that will pass PR from the old page to the new page.  For example, if www.domain.com/oldpage.html is redirected with a 301 to www.domain.com/newpage.html, Google will assume that the links are for www.domain.com/newpage.html and index it accordingly.  This is the only type of redirect that will do this and it makes sense if you read the RFC 2626 quote on this:

"301 Moved Permanently
The requested resource has been assigned a new permanent URI and any future references to this resource SHOULD use one of the returned URIs.

302 Found
The requested resource resides temporarily under a different URI. Since the redirection might be altered on occasion, the client SHOULD continue to use the Request-URI for future requests."

From an SEO perspective, the objective is to make sure that the server returns an http header with -
HTTP/1.1 301 Moved Permanently
The slight change in syntax ensures that it does.

If a 302 (for example) is returned, then the page is found and the old page will be indexed.  From what I understand, Google will eventually realized that a long-term 302 is meant to be a 301 and will treat it accordingly.  It's not something you want to rely on, though.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
meverestCommented:
just a few quick comment about isapi - if you have ms visual studio, there are a couple of isapi samples in there that are useful.  the msdn documentation is also very good.  and there are two kinds of isapi, it;s the isapi 'filter' that you want for this job.

cheers.
0
Ralf KlattEmployee in Civil ServiceAuthor Commented:
Hi,

@humeniuk ... up today I thought that I'm one of the "few" guys understanding Google ... well, today I've learned something -> but, please give me the time to check if things are like they seem (on a "today's basis") ...

@meverest ... I have all v-studios up to the recent ones ... I've past half of this easter monday to get on the right ISAPI-Track ... well yet, I wasn't successful ...


Best regards,
Raisor
0
Ralf KlattEmployee in Civil ServiceAuthor Commented:
Hi,

Well, I've found out a way that will serve to what I'm up to do ... humeniuk has given me some inspiration on why it could be useful to develop my own ISAPI Libraries ... leew is some kind of a practical advisor ... I'll surely continue with Apatche (I'm receiving all UPDATES in an automated way!) ... meverest pointed to the right direction -> msdn -> I've played a little with cgi2asp.exe which I downloaded in source code from msdn and which I'm going to re-engineer the way I need!

Actually, not having the time for any re-engineering projects, what I'll do is the following -> I'll continue developing w62 -> I've already added ten more countries -> all together arround 25.000 static html pages now ... the current ASPX pages will be changed on "Code-Behind-Level" -> I'll be redirecting depending on incoming parameters ... while I can't imagine what impact this might have on SE level (PR etc.) I'm expecting that these changes may give me a 1-3 month headache -> after this period everything will be even better than before ... ;-))

Thanks for all suggestions that helped me making a descision on that matter!


Best regards,
Raisor
0
humeniukCommented:
First of all, thank you for the A  :)


"@humeniuk ... up today I thought that I'm one of the "few" guys understanding Google ... well, today I've learned something -> but, please give me the time to check if things are like they seem (on a "today's basis") ..."

I'm not sure that anyone really understands Google :)  This is by design, of course.  If one could understand Google, presumably one would be able to exploit their complex (and ever changing) algorithms and achieve higher rankings.  The numerous PhD's on their staff are well paid to keep us in the dark as well as to keep improving the search engine itself.

BTW - if you have any SEO related questions in the future, you should take a look at the Online Marketing TA (www.experts-exchange.com/Web/Online_Marketing).  You'll be sure to get some first-rate advice.

And good luck with the project.  It will be a lot of work, but as you said, worthwhile in the end.
0
Ralf KlattEmployee in Civil ServiceAuthor Commented:
Hi,

Thanks fo your latest comment humeniuk!

There might be some kind of obvious arrogance within stating "up today I thought that I'm one of the "few" guys understanding Google ..." ... well, let me tell you that, in the past three years, I've spent most of my time reading and learning about SEO Strategies ... if I'd write an e-book ... ;-)) ... but finally I made it yet to place any kind of (good content!) page at a good position even at google ... not unlike to others I'm also in the dark why a page that worked out for two or three month suddenly gets lost at google ... the only thing that I can assume is, that there are open doors and that there's a way of accusing site owners that they're "spamming" one or another way -> any site owner (small business) that's once have been accused (no matter if right or wrong!) at google can throw his/her page into the bin ... that's my experience ...

... the good is that there's not only google but also other search engines ...

... thanks for the hint to www.experts-exchange.com/Web/Online_Marketing ... I'll certainly have a close look at it!


Best regards,
Raisor
0
humeniukCommented:
"There might be some kind of obvious arrogance . . . "

I didn't perceive it that way :)


"not unlike to others I'm also in the dark why a page that worked out for two or three month suddenly gets lost at google ... "

SEO is not rocket science, but there are some specific do's and don'ts.  Sometimes there are completely legitimate reasons for a site dropping in the rankings - ie. breaking SEO 'rules', spamming, etc. - sometimes they're not so fair or legitimate - do a search on 'Google Florida update', named after the 2000 Florida election fiasco.  Then there's the dreaded Google sandbox . . .


"the only thing that I can assume is, that there are open doors and that there's a way of accusing site owners that they're "spamming" one or another way -> any site owner (small business) that's once have been accused (no matter if right or wrong!) at google can throw his/her page into the bin ... that's my experience ..."

In most cases, a website or domain can be rehabilitated simply by removing the offending elements.  Once the site is re-indexed, the changes will be taken into consideration.  In the most serious cases of wanton abuse, contacting Google with a serious mea culpa and a demonstration that you've changed your ways or even changing domains will be necessary.


"... the good is that there's not only google but also other search engines ..."

Yes, but the only relevant ones are Google, MSN, and Yahoo!.  Together they will account for 95%+ of your search engine traffic.  Getting your website listed in the appropriate category of the Open Directory Project (www.dmoz.org) is probably next on the list of relevance rather than any other search engine (or perhaps the rest of them combined).


Regards.
0
Ralf KlattEmployee in Civil ServiceAuthor Commented:
Hi,

Thanks a lot for your response ... I really appreciate!

To tell you, I'm a Google Media Partner and being that one should not expect that one could be accused from today to tomorrow ... and one would expect that one would be informed that one has been accused so that one could take appropriate measures -> to tell you ... one is just being reduced from 100% to arround 5% -> you may imagine the impact on cash flow and the worst -> the lost of trust from all kind of clients ...

I'm running 50 domains and arround 150 subdomains -> there's always one performing well, two month later another one ... I'm still waiting that they all perform well at the same time! ... ;-))


Best regards,
Raisor
0
humeniukCommented:
You may be waiting a while for 200/200   :)
0
Ralf KlattEmployee in Civil ServiceAuthor Commented:
:)
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft IIS Web Server

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.