Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • 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!

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

LINK TO THIS FORUM!

Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Partner With Us!

"Best Of Breed" Forums Add Stickiness To Your Site
Partner Button
(Download This Button Today!)

Feedback

"...The enviroment is simple, natural and efficient. The members are competent, educated and professionals..."

Geography

Where in the world do Tek-Tips members come from?

Anyone using wordpress with permalinks on iis7 on 2008 R2

tyutghf (TechnicalUser)
22 Aug 11 9:23
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

CODE

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

CODE

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

CODE

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?

Thanks

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!

Back To Forum

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