[wp-hackers] Update Plugin Rewrite Rules
Mr.Brown
mrbrog at gmail.com
Sat Jan 14 16:42:01 GMT 2006
Hi all,
A fotogallery plugin I wrote uses some rewrite rules to define a page
used to show photo albums:
When I created a page with nicename "pics", WP (1.5) added these rules
to .htaccess
RewriteRule ^(pics)/trackback/?$ /index.php?pagename=$1&tb=1 [QSA,L]
RewriteRule ^(pics)/feed/(feed|rdf|rss|rss2|atom)/?$
/index.php?pagename=$1&feed=$2 [QSA,L]
RewriteRule ^(pics)/(feed|rdf|rss|rss2|atom)/?$
/index.php?pagename=$1&feed=$2 [QSA,L]
RewriteRule ^(pics)/page/?([0-9]{1,})/?$ /index.php?pagename=$1&paged=$2 [QSA,L]
RewriteRule ^(pics)(/[0-9]+)?/?$ /index.php?pagename=$1&page=$2 [QSA,L]
and I added these to show album and pics (and pagination)
RewriteRule ^pics/([^/]+)/$ /pics/?album=$1 [QSA,L]
RewriteRule ^pics/([^/]+)/([0-9]+)/$ /pics/?album=$1&pagina=$2 [QSA,L]
RewriteRule ^pics/([^/]+)/([^/]+)$ /pics/?album=$1&photo=$2 [QSA,L]
These rules worked perfectly with WP 1.5, but in 2.0 they don't work.
How can I update these rules to get them work with new rewrite rules in WP 2.0?
Thanks in advance.
--
Mr.Brown
More information about the wp-hackers
mailing list