By brashquido on
Hi All,
Just made an update to the guides section of my site to include instructions for generating clean URL's using the new 3.x release of Helicon's ISAPI Rewrite. Basically you shouldn't have to do a lot now if you purchase the full version of ISAPI rewrite as it is compatible with .htaccess files, so this guide covers what you need to do when using the free versions which has several limitations over the full version.
Using Drupal Clean URLs with IIS and ISAPI Rewrite Version 3
Comments
The REQUEST_URI issue...
No mention for IIS Mod-Rewrite? No, that tool does not even exist???
If the news is "Easy Clean URLs for IIS" then it's already pretty old news. Clean urls on IIS has got a lot simpler since IIS Mod-Rewrite Pro came into the play. I posted about it a long time ago ( http://drupal.org/node/61367 ) but I was accused that I work for ISAPI Rewrite competitors, that I was spamming and a lot more. Now ISAPI Rewrite can do it too and that's great news... hmmmmm...
For the readers of this thread I must also post that older thread...
http://drupal.org/node/159836
I really don't like what happens with some guys here in this forum, but of course, I must now state that ISAPI Rewrite v3.0 is not "wrong" anymore. It's a great tool now! And, brashquido, although I don't like how you intentionally do not even mention IIS Mod-Rewrite (which still in my opinion is somewhat better), I must tell that your article is great!
Anyway, I ran into a thread in wordpress forum and I thought it would be nice to post here the following lines of php code:
// IIS Mod-Rewrite
if (isset($_SERVER['HTTP_X_ORIGINAL_URL'])) {
$_SERVER['REQUEST_URI'] = $_SERVER['HTTP_X_ORIGINAL_URL'];
}
// IIS Isapi_Rewrite
else if (isset($_SERVER['HTTP_X_REWRITE_URL'])) {
$_SERVER['REQUEST_URI'] = $_SERVER['HTTP_X_REWRITE_URL'];
}
With this code, wordpress as of version 2.3, natively supports ISAPI_Rewrite and IIS Mod-Rewrite. The situation with mod_rewrite compatible url rewriting on IIS is quite mature now, so may be it's time for the drupal coders to add this code in settings.php or wherever appropriate.
Way back, I posted a solution ( http://www.micronovae.com/ModRewrite/articles/CleanPermalinks.html ) from IIS Mod-Rewrite site which actually suggests something similar with the code above. I'm mentioning this, because the effect of inserting this code is that the "clean url test" is passed as smooth as silk. Of course setting either $conf['clean_url'] or $_SERVER['REQUEST_URI'] is the same tweaking effort, but that if the code above is adopted by Drupal, there will be need for tweaking anymore. Again, note that this works for both IIS Mod-Rewrite and ISAPI Rewrite v3.
Interesting reply...
Blur, I can't speak for the those who said those things about you, but you really need to learn to count to ten and think about what you are posting before you hit that "Post Comment" button. It is no excuse to post with that sort of attitude just because others have treated you the same way. The ONLY time I have every pulled you up on your postings is when you explicitly said ISAPI Rewrite was the wrong tool for URL rewriting with Drupal, said that it had stability issues and that people should be using IIS Mod-Rewrite Pro instead. I pulled you up on these points (or the first two at least) because they are simply incorrect. Period. I have NEVER inferred you work for ISAPI Rewrite competitors or for spamming the forums, and I would appreciate it if you'd extend the same courtesy to me.
In no way have I intentionally not mentioned IIS Mod-Rewrite Pro. As I have explained to you before, I have been using ISAPI Rewrite for years and as I have shelled out for the full version it is the logical choice for my IIS URL manipulation needs which is why the guides I write for my site use this solution. There are around half a dozen IIS URL manipulation tools I can think of. Does the fact that I don't mention them mean I am doing that intentionally too? What about yourself for that matter. Why don't you mention these other options? I use ISAPI Rewrite, you use IIS Mod-Rewrite Pro and I'm sure there are other using other rewriting solutions for IIS. People are going to use and recommend what they have had success with.
Just to clarify the REQUEST_URI issue too for any users/devs who stumble over this thread. I think the php code blur posted above is a good idea for inclusion into the core because IIS does not support modification of server variables like Apache. This is not a limitation of the rewriting tools, just one of those IIS things I think.
----------------
Dominic Ryan
www.iis-aid.com
Dear brashquido,I really
Dear brashquido,
I really want to apologize if your intention was pure. Actually, as I have clearly stated in this and other posts, I do appreciate your work. Just I have been badly offended in this forum since my very first visit and I want you to understand the conditions under which I had some attitude in my last post. Sometimes things look different than what they actually are.
Ok, you might have already figured out how picky I am with software quality. The only url rewrite tools for IIS I can talk about at this moment is IIS Mod-Rewrite Pro and ISAPI Rewrite 3. I always find ISAPI Rewrite 2 "wrong" and I'm glad their new mod_rewrite compatible version is out. Actually, I'm double happy about it as IIS Mod-Rewrite, which I prefer, has lowered prices since then :-) But I find no reason to talk about any other rewriting tool as everything else is total trash to me. Trust me I have evaluated almost everything. One exception, there is ASP.NET url rewriting, which is very powerful, but its concept is completely different and does not apply here.