Prusak.com

Serving up my thoughts since 2004

ipb seo friendly urls with iis

So we’ve been running the user forums at http://forum.resperate.com for a few weeks and we’re getting some good user entries. We’re using invision power board 2.1 on a windows 2003 box running IIS6 and php 4.3.

Of course I want the URLs to be search engine friendly, but I was not able to find anyone claiming to have a solution for IIS. they all want mod_rewrite under apache.

So after a bit of googling, this looks like what I want:
http://www.alt-man.co.uk/FURL/Documentation.htm

but of course it also wants mod_rewrite. no biggie – I say to myself. I’ll just google mod_rewrite and IIS.
after of searching, this seems to be what I want – isapirewrite:
http://www.isapirewrite.com/

At this point I actually started reading about their linkfreeze product, which seemed like a plug and play solution for what I wanted (albeit not as good as FURL) so I downloaded it and tried it out. To make a long story short, linkfreeze doesn’t work with Invision Power Board 2.1 out of the box.Update: I just got a reply from them saying that linkfreeze doesn’t work with http compression turned on (makes sense).

So, back to my original plan, I decide to go with isapirewrite. This is a commercial product, but for some strange reason, I figured that it’s of better quality than the free mod_rewrite for IIS solutions out there.

I install it, but it’s not doing anything. Zilch.

A bit more reading the docs (if all else fails, read the docs) it seems that there are some special notes on using isapirewrite under IIS 6. as per the instructions I add iis_wpg group access to the files and viola – it’s working!
of course the syntax for isapirewrite is not exactly the same as mod_rewrite so I had to make a few changes to the .htaccess file the comes with FURL.

Here is the correct syntax to get FURL to work with IIS and isapirewrite:


#
# mod_rewrite in use
#
#RewriteEngine On
# Uncomment following line if your webserver's URL
# is not directly related to physival file paths.
# This is usually not needed.
# RewriteBase /YourForumDirectory
#
# Rules
#
# Gallery
RewriteRule /gallery.html(.*) /index.php?act=module&module=gallery$1
# DO THE TOPIC URLS
RewriteRule /(.*)-t([0-9][0-9]*)-s([0-9][0-9]*).html(.*) /index.php?showtopic=$2&st=$3
RewriteRule /(.*)-t([0-9][0-9]*).html(.*) /index.php?showtopic=$2$3
# DO THE FORUM URLS
RewriteRule /(.*)-new-topic-f([0-9]*).html(.*) /index.php?act=Post&CODE=00&f=$2$3
RewriteRule /(.*)-new-poll-f([0-9]*).html(.*) /index.php?act=Post&CODE=10&f=$2$3
RewriteRule /(.*)-f([0-9][0-9]*).html(.*) /index.php?showforum=$2$3
# DO EMAIL AND PM URLS
RewriteRule /(.*)-a-private-message-m([0-9]*).html(.*) /index.php?act=Msg&CODE=4&MID=$2$3
RewriteRule /(.*)-an-email-m([0-9]*).html(.*) /index.php?act=Mail&CODE=00&MID=$2$3
# DO THE PROFILE URLS
RewriteRule /(.*)-m([0-9]*).html(.*) /index.php?showuser=$2$3
# Login/Logout
RewriteRule /logout.html(.*) /index.php?act=Login&CODE=03$1
RewriteRule /login.html(.*) /index.php?act=Login&CODE=00$1
RewriteRule /register.html(.*) /index.php?act=Reg&CODE=00$1
# STATS AND LEGENDS
RewriteRule /the-moderating-team.html(.*) /index.php?act=Stats&CODE=leaders$1
RewriteRule /todays-top-10-posters.html(.*) /index.php?act=Stats$1
# MEMBERS LIST
RewriteRule /member-list.html(.*) /index.php?act=Members$1
# ONLINE LIST
RewriteRule /online-list.html(.*) /index.php?act=Online$1
# HELP
RewriteRule /(.*)-h([0-9]*).html(.*) /index.php?act=help&CODE=01&HID=$2$3
RewriteRule /(.*)help.html(.*) /index.php?act=Help$2
# USER CP
RewriteRule /my-controls.html(.*) /index.php?act=UserCP&CODE=00$1
# MESSENGER
RewriteRule /compose-new-message.html(.*) /index.php?act=Msg&CODE=04$1
RewriteRule /inbox.html(.*) /index.php?act=Msg&CODE=01&VID=in$1
RewriteRule /sent-items.html(.*) /index.php?act=Msg&CODE=01&VID=sent$1
RewriteRule /saved-pms.html(.*) /index.php?act=Msg&CODE=20$1
RewriteRule /empty-pm-folders.html(.*) /index.php?act=Msg&CODE=delete$1
RewriteRule /edit-storage-folders.html(.*) /index.php?act=Msg&CODE=07$1
RewriteRule /pm-buddies.html(.*) /index.php?act=Msg&CODE=02$1
RewriteRule /archive-messages.html(.*) /index.php?act=Msg&CODE=14$1
RewriteRule /message-tracker.html(.*) /index.php?act=Msg&CODE=30$1
RewriteRule /new-messages.html(.*) /index.php?act=Msg&CODE=01$1
# SUBSCRIPTIONS
RewriteRule /view-topic-subscriptions.html(.*) /index.php?act=UserCP&CODE=26$1
RewriteRule /view-forum-subscriptions.html(.*) /index.php?act=UserCP&CODE=50$1
# PERSONAL PROFILE
RewriteRule /edit-profile-info.html(.*) /index.php?act=UserCP&CODE=01$1
RewriteRule /edit-signature.html(.*) /index.php?act=UserCP&CODE=22$1
RewriteRule /edit-avatar-settings.html(.*) /index.php?act=UserCP&CODE=24$1
RewriteRule /change-personal-photo.html(.*) /index.php?act=UserCP&CODE=photo$1
# OPTIONS
RewriteRule /manage-your-attachments.html(.*) /index.php?act=UserCP&CODE=attach$1
RewriteRule /manage-ignored-users.html(.*) /index.php?act=UserCP&CODE=ignore$1
RewriteRule /email-settings.html(.*) /index.php?act=UserCP&CODE=02$1
RewriteRule /board-settings.html(.*) /index.php?act=UserCP&CODE=04$1
RewriteRule /change-email-address.html(.*) /index.php?act=UserCP&CODE=08$1
RewriteRule /change-password.html(.*) /index.php?act=UserCP&CODE=28$1
# MODERATOR TOOLS
RewriteRule /ip-tool.html(.*) /index.php?act=UserCP&CODE=iptool$1
RewriteRule /member-tool.html(.*) /index.php?act=UserCP&CODE=memtool$1
RewriteRule /manage-anoucements.html(.*) /index.php?act=UserCP&CODE=announce_start$1
# GET NEW POSTS
RewriteRule /get-new-posts.html(.*) /index.php?act=Search&CODE=getnew$1
# DO THE FORUM INDEX
RewriteRule /forums.html(.*) /index.php?act=idx$3

2 Comments

  1. I have been using linkfreeze.. It isa real pain to make SEF Url on IIS server.
    I could not make the free version of ISAPi writer work then start to use linkfreeze. I will try the info you gave on the top. Lets see if it will work this time..

    Thanks

  2. You need to put “#RewriteEngine On” to “RewriteEngine On”

Comments are closed.

© 2019 Prusak.com

Theme by Anders NorenUp ↑