| Author |
|
axiom11 Newbie

Joined: 19 March 2011
Online Status: Offline Posts: 3
|
| Posted: 19 March 2011 at 7:08pm | IP Logged
|
|
|
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
Online Status: Offline Posts: 10520
|
| Posted: 21 March 2011 at 4:54am | IP Logged
|
|
|
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
Online Status: Offline Posts: 3
|
| Posted: 21 March 2011 at 9:28am | IP Logged
|
|
|
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
Online Status: Offline Posts: 10520
|
| Posted: 21 March 2011 at 9:37am | IP Logged
|
|
|
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
Online Status: Offline Posts: 3
|
| Posted: 21 March 2011 at 11:25am | IP Logged
|
|
|
Thankyou so so much :)
All the best.
|
| Back to Top |
|
| |
|
|