wordpress rewrite....again

Topics: User Forum
Sep 4, 2009 at 1:51 AM
Edited Sep 4, 2009 at 1:52 AM

I've tried all the examples in this forum (in my search for wordpress) and the only part of my wordpress site that works are the blog articles (i.e. www.domain.com/?p=101 is rewritten to www.domain.com/2009/05/postname/ for example)

I get a bad gateway error when i go to any page, tag or category.

  • I'm running Wordpress 2.8.4
  • Webserver is runing IIS
  • I'm adding the code to the IsapiRewrite4.ini file
  • My blog is in the root of my site

Any suggestions?

TIA
G.

 

 

Sep 14, 2009 at 3:49 PM

You and I are in the same boat. I got categories working as well though, I will post by mods tonight

I am still struggling for help with pages and tags. No one on this forum gives you an example though. I was suggested by cheeso to look at the log file. I tried to create log files but my web host doenst really open permissions on the right folders. Without a working example I dont know how to go further.

 

Go luck

Coordinator
Sep 14, 2009 at 7:25 PM

can you not install IIS and Wordpress on your local machine and work through the rules that way?

Sep 15, 2009 at 12:13 PM

Hi

Heres what I have done to get the categories workin

 

RewriteRule ^/category/boston-events  /index.php?cat=1
RewriteRule ^/category/dallas-events  /index.php?cat=38
RewriteRule ^/category/new-jersey-events  /index.php?cat=39
RewriteRule ^/category/new-york-events  /index.php?cat=37
RewriteRule ^/category/washington-dc-events  /index.php?cat=40

RewriteRule ^/category/boston-events  /index.php?cat=1

RewriteRule ^/category/dallas-events  /index.php?cat=38

RewriteRule ^/category/new-jersey-events  /index.php?cat=39

RewriteRule ^/category/new-york-events  /index.php?cat=37

RewriteRule ^/category/washington-dc-events  /index.php?cat=40

Hope this helps

DaCoder

 

Sep 15, 2009 at 2:13 PM
Edited Sep 15, 2009 at 2:17 PM

Hi

This worked for me for page navigation

RewriteRule ^/page/([^/]+)$  /index.php?paged=$1

and this for tags

RewriteRule ^/tag/([^/]+)$  /index.php?tag=$1

 

Yeaaaaaaaa..... I am happy today

Coordinator
Sep 19, 2009 at 3:08 AM

Thanks for contributing.  It might be helpful for future wordpress users if you could bring it all together and present one, complete IIRF ini file for wordpress, with documentation for each rule. 

 

Sep 20, 2009 at 9:20 PM

Thanks for the help dacoder, unfortunately.. it didn't change a thing for me... it loads posts no problem... but i get "Bad Gateway" when i try to load pages, categories and tags.

Maybe i'll contact my webhost.. I'm at a loss...

 

Here is the current setup of the isapirewrite4.ini file.

RewriteRule ^/(?!index.php)(?!wp)([^\.]*)$     /index.php/$1        [I]

RewriteRule ^/category/diy  /index.php?cat=3
RewriteRule ^/category/general  /index.php?cat=1
RewriteRule ^/category/house_reno  /index.php?cat=4
RewriteRule ^/category/pets  /index.php?cat=138
RewriteRule ^/category/photography  /index.php?cat=5
RewriteRule ^/page/([^/]+)$  /index.php?page_id=$1
RewriteRule ^/tag/([^/]+)$  /index.php?tag=$1

 

any other tips would be appreciated!

G

Sep 22, 2009 at 10:46 PM

All fixed!

Contacted my host and the reason it wasn't working is that PHP engine had to be switched from CGI mode to ISAPI mode.

Thank you dacoder and all those who contributed to other wordpress discussions.

Here are my rules in case anyone needs them.

==========================

RewriteRule ^/(?!index\.php|wp-|xmlrpc)(.*)$ /index.php/$1 [I,L]

#RewriteRule ^/(?!index.php)(?!wp)([^\.]*)$     /index.php/$1        [I]
#RewriteRule ^/category/diy  /?cat=3
#RewriteRule ^/category/general  /index.php?cat=1
#RewriteRule ^/category/house_reno  /index.php?cat=4
#RewriteRule ^/category/pets  /index.php?cat=138
#RewriteRule ^/category/photography  /index.php?cat=5
#RewriteRule ^/page/([^/]+)$  /index.php?page_id=$1
#RewriteRule ^/tag/([^/]+)$  /index.php?tag=$1

==========================

Cheers,

G

Coordinator
Sep 23, 2009 at 12:54 AM

terrific, glad to hear it.