Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here


Anyone using wordpress with permalinks on iis7 on 2008 R2

Anyone using wordpress with permalinks on iis7 on 2008 R2

Anyone using wordpress with permalinks on iis7 on 2008 R2

I have built a site that has to run on Windows Server 2008 R2, the server has isapi rewrites 3 full version installed.

Now I usually put wordpress sites on linux servers and use a simple .htaccess reg exp


# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# END WordPress

that allows me to use the permalink /%postname%/ which no matter how many levels deep will display the permalink correctly and also allow the admin to work.

A similar rule in isapi is


RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

#RewriteRule ^[^/]+/?$ index.php?p=$1 [NC,L]

but this only works for 1 level i.e. www.site.com/something/

The site has upto 4 levels so I now have


RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^[^/]+/?$ index.php?p=$1 [NC,L]
RewriteRule ^([^/]+)/[^/]+/?$ index.php?p=$1 [NC,L]
RewriteRule ^([^/]+)/[^/]+/[^/]+/?$ index.php?p=$1 [NC,L]
RewriteRule ^([^/]+)/[^/]+/[^/]+/[^/]+/?$ index.php?p=$1 [NC,L]

This displays the pages but messes up the stylesheets, .js files etc as they all come out as 404's.

Also, the admin doesn`t work as this also goes to a 404.

Is there any way to make the rules ignore anything that contains wp- so that the admin works (wp-admin) and the outward facing website can still find wp-content and wp-includes?


Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close