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 Pages ReWrite Rule
Author
Message |
axiom11
Newbie


Joined: 19 March 2011
Posts: 3
Posted: 19 March 2011 at 7:08pm

I've browsed this forum a lot and always found it very helpful, but can't find a solution to my current problem. I'm using Wordpress on IIS, with ISAPI ReWrite2, and everything is
working just fine, posts are showing with the correct permalink structure, categories, rss feeds etc, but pages are not working.

I don't think I have a rule in my httpd.ini file that covers pages, and can't for the life of me work one out.

The file looks like this at present, if anyone could tell me what I'm missing it'd be greatly appreciate:


[ISAPI_Rewrite]
RewriteRule /([0-9]{4})/([0-9]{1,2})/ /index.php\?year=$1&monthnum=$2 [I,U,O]
RewriteRule /([0-9]{4})/([0-9]{1,2})/(.*)/(feed|rdf|rss|rss2|atom|rss2_comments)/?$ /index.php\?feed=$4&name=$3 [I,U,O]
RewriteRule /([0-9]{4})/([0-9]{1,2})/(.*)/trackback/?$ /wp-trackback.php\?year=$1&monthnum=$2&name=$3 [I,U,O]
RewriteRule /category/(.*)/(feed|rdf|rss|rss2|atom|rss2_comments)/?$ /index.php\?category_name=$1&feed=$2 [I,U,O]
RewriteRule /category/(.*) /index.php\?category_name=$1 [I,U,O]
RewriteRule /author/(.*)/(feed|rdf|rss|rss2|atom|rss2_comments)/?$ /index.php\?author_name=$1&feed=$2 [I,U,O]
RewriteRule /author/?(.*) /index.php\?author_name=$1 [I,U,O]
RewriteRule /([0-9]{4})/([0-9]{1,2})/?(.*) /index.php\?name=$3 [I,U,O]
RewriteRule /feed/(.*) /wp-rss2.php [I,U,O]
RewriteRule /comments/feed/(.*) /wp-commentsrss2.php [I,U,O]


Regards,

Glenn
Back to Top
 
Anton
Admin Group


Joined: 30 January 2007
Location: Ukraine
Posts: 10519
Posted: 21 March 2011 at 4:54am

Could you please show examples of specific requests which fail to work for you.
And I'll try to find out why it's not working.

__________________
Regards,
Anton
Back to Top
 
axiom11
Newbie


Joined: 19 March 2011
Posts: 3
Posted: 21 March 2011 at 9:28am

I actually just got it working, but thanks for replying.

It was things like www.domain.com/contact-us/ that was giving me the
problem. But I added:

RewriteRule /(.*)/ /index.php\?page_id=$1 [I,U,O]

at the bottom of the list of rules, which has fixed it. Now I just need to work
out how to exclude a directory from that rule.
Back to Top
 
Anton
Admin Group


Joined: 30 January 2007
Location: Ukraine
Posts: 10519
Posted: 21 March 2011 at 9:37am

To exclude directories, use the following syntax:

RewriteRule /(?!(?:dir1|dir2|etc))(.*)/ /index.php\?page_id=$1 [I,U,O]

where dir1, dir2, etc are the directories to be excluded.

__________________
Regards,
Anton
Back to Top
 
axiom11
Newbie


Joined: 19 March 2011
Posts: 3
Posted: 21 March 2011 at 11:25am

Thankyou so so much :)

All the best.
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