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
 Helicon Tech : ISAPI_Rewrite 2.x
Subject Topic: Wordpress Pages ReWrite Rule Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
axiom11
Newbie
Newbie


Joined: 19 March 2011
Online Status: Offline
Posts: 3
Posted: 19 March 2011 at 7:08pm | IP Logged Quote axiom11

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 View axiom11's Profile Search for other posts by axiom11
 
Anton
Admin Group
Admin Group


Joined: 30 January 2007
Location: Ukraine
Online Status: Offline
Posts: 10520
Posted: 21 March 2011 at 4:54am | IP Logged Quote Anton

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 View Anton's Profile Search for other posts by Anton
 
axiom11
Newbie
Newbie


Joined: 19 March 2011
Online Status: Offline
Posts: 3
Posted: 21 March 2011 at 9:28am | IP Logged Quote axiom11

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 View axiom11's Profile Search for other posts by axiom11
 
Anton
Admin Group
Admin Group


Joined: 30 January 2007
Location: Ukraine
Online Status: Offline
Posts: 10520
Posted: 21 March 2011 at 9:37am | IP Logged Quote Anton

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 View Anton's Profile Search for other posts by Anton
 
axiom11
Newbie
Newbie


Joined: 19 March 2011
Online Status: Offline
Posts: 3
Posted: 21 March 2011 at 11:25am | IP Logged Quote axiom11

Thankyou so so much :)

All the best.
Back to Top View axiom11's Profile Search for other posts by axiom11
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
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