This forum has been moved here:
Helicon Tech Community Forum

  Active TopicsActive Topics  Display List of Forum MembersMemberlist  HelpHelp   RegisterRegister  LoginLogin
ISAPI_Rewrite 2.x (Forum Locked Forum Locked)
 Helicon Tech : ISAPI_Rewrite 2.x
Subject Topic: WordPress Multisite Permalinks: IIS6
Author
Message |
ahco
Newbie


Joined: 14 November 2011
Posts: 4
Posted: 14 November 2011 at 5:12pm

Need some help here.

I'm building a Wordpress Multisite on a client' shared host, which is
running IIS6 and ISAPI Rewrite 2.x.

The Wordpress installation is in a directory just inside the root, as there is
already a live site in the root, i.e. www.website.com/wordpress/

I have an httpd.ini in the root that contains the following:

Code:

RewriteEngine on

RewriteBase /Website
RewriteRule ^press/(\d+)_.+$ press.php?id=$1 [QSA]
RewriteRule ^profile/(\d+)_.+$ profile.php?id=$1 [QSA]

[ISAPI_Rewrite]
RewriteRule /wordpress/(?!(?:wp-includes|wp-admin|wp-
content|blogs.dir|plugins|themes|upgrade|upload|images|css|js|2011))
([^/]+)/? /wordpress/index.php\?p=$1 [I,L]


The homepage is coming up fine, with all required elements. However, if I
click on anything I get an error. For pages, I get the built in WP 404 error.
For posts, I get "The system cannot find the path specified."

My permalinks are set to
Code:
/%category%/%postname%/


Pages should show in permalinks like:
www.website.com/wordpress/page-name

Posts should show in permalinks like:
www.website.com/wordpress/category/post-name

However, this is not the case. Help would be appreciated.

Note: I do not have access to the server configuration, and the host
will not upgrade to version 3 of ISAPI Rewrite.
Back to Top
 
Anton
Admin Group


Joined: 30 January 2007
Location: Ukraine
Posts: 10519
Posted: 15 November 2011 at 12:32am

Hello,

Firstly, in the config you showed above the first 4 lines are written in ISAPI_Rewrite 3 syntax. The rest is for v2.
Secondly, could you please show examples of requests to pages/posts and where they should lead to.

__________________
Regards,
Anton
Back to Top
 
ahco
Newbie


Joined: 14 November 2011
Posts: 4
Posted: 15 November 2011 at 7:14am

Anton wrote:
Hello,

Firstly, in the config you showed above the first 4 lines are written in
ISAPI_Rewrite 3 syntax. The rest is for v2.
Secondly, could you please show examples of requests to pages/posts
and where they should lead to.


Anton, thanks for your reply. The first 4 lines were there for the site that
is in the root, and as I'm not working on that site I didn't want to change
them.

In any case, I was able to make this work. Here is the contents of my
httpd.ini:

Code:

RewriteEngine on

RewriteBase /Website
RewriteRule ^press/(\d+)_.+$ press.php?id=$1 [QSA]
RewriteRule ^profile/(\d+)_.+$ profile.php?id=$1 [QSA]

[ISAPI_Rewrite]

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
rewriterule (.*)$ $1 [L]

# For normal content & image files to go through
RewriteRule /wordpress/images/(.*) /wordpress/images/$1 [L]
RewriteRule /wordpress/easycgi.php /wordpress/easycgi.php [I,L]

# For file-based wordpress content (i.e. theme), admin, etc.
RewriteRule /wordpress/wp-(.*) /wordpress/wp-$1 [I,L]

# For normal wordpress content, via index.php
RewriteRule ^wordpress/$ /wordpress/index.php [L]
RewriteRule /wordpress/(.*) /wordpress/index.php/$1 [L]


This fixed everything but the appearance of the /index.php/ in the
permalinks. I used a WP plugin to remove those.
Back to Top
 
ahco
Newbie


Joined: 14 November 2011
Posts: 4
Posted: 15 November 2011 at 3:14pm

Anton,

Okay, so the current status of my httpd.ini file is :

Code:

[ISAPI_Rewrite]

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule /certified-contractors/wp-(.*) /certified-contractors/wp-$1
[I,L]
RewriteRule /certified-contractors/([_0-9a-zA-Z-]+/)?files/(.+) certified-
contractors/wp-includes/ms-files.php?file=$2 [L]
RewriteRule /certified-contractors/([_0-9a-zA-Z-]+/)?wp-admin$
certified-contractors/$1wp-admin/ [R=301,L]
RewriteRule /certified-contractors/([_0-9a-zA-Z-]+)/wp-
content/themes/(.*)$ /certified-contractors/wp-content/themes/$2 [L]
RewriteRule /certified-contractors/[_0-9a-zA-Z-]+/(wp-
(content|admin|includes).*) /certified-contractors/$1 [L]
RewriteRule /certified-contractors/[_0-9a-zA-Z-]+/(.*\.php)$ /certified-
contractors$1 [L]
RewriteRule /certified-contractors/(.*) /certified-contractors/index.php
[L]


I have some pages that have "/landing-page" in the permalink. How do I
remove this from all permalinks in which it appears by using the httpd.ini
file?

Thanks for your assistance.

- Andrew
Back to Top
 
ahco
Newbie


Joined: 14 November 2011
Posts: 4
Posted: 15 November 2011 at 3:46pm

Anton,

Also, I was mistaken. The server configuration is WS 2008, IIS7, ISAPI
Rewrite 2.x

- Andrew
Back to Top
 
Anton
Admin Group


Joined: 30 January 2007
Location: Ukraine
Posts: 10519
Posted: 16 November 2011 at 8:39am

1. These lines won't work in v2:

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d

2. "I have some pages that have "/landing-page" in the permalink. How do I remove this from all permalinks in which it appears by using the
httpd.ini file?"
- could you please give some examples so that I can write you specific rules.

__________________
Regards,
Anton
Back to Top
 

Sorry, you can NOT post a reply.
This forum has been locked by a forum administrator.

Printable version Printable version
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum