View Single Post
  #9 (permalink)  
Old 04-20-2008, 07:53 PM
na3s na3s is offline
Casual Pligger
 
Join Date: Apr 2008
Posts: 48
The code above doesn't work for me, mostly because in 9.9.0 ALL links go to URL Method 2. I use the code below, it may be sloppy but it works fine. Note: This code is super temporary, the way the code is written for pligg currently makes this task difficult (especially since upgrades will probably break this code.) However, it should work fine for 9.9.0. USE AT OWN RISK.

Check here for urlMethod 2 Wiki

#start

RewriteEngine On

#categories
RewriteRule ^category/(.*)$ index.php?category=$1 [L]
RewriteRule ^category/(.*)$ upcoming.php?category=$1 [L]

#admin function from story
RewriteRule ^story/(.*)/edit/$ editlink.php?id=$1 [L]
RewriteRule ^story/(.*)/modify/main/$ linkadmin.php?id=$1&action=main [L]

#stories various rules to cover multiple configs. (friendlyURL config...)
RewriteRule ^story/title/(.*)$ story.php?title=$1 [L]
RewriteRule ^story/title/(.*)/$ story.php?title=$1 [L]
RewriteRule ^(.*)/(.*)/$ story.php?title=$2&category=$1 [L]

#random story
RewriteRule ^story/(.*)$ story.php?id=$1 [L]

#upcoming main and sorting
RewriteRule ^upcoming$ upcoming.php [L]
RewriteRule ^upcoming/(.*)/$ upcoming.php?part=upcoming&order=$1 [L]
RewriteRule ^upcoming/(.*)/category/(.*)$ upcoming.php?part=upcoming&order=$1&category=$2 [L]

#published main and sorting
RewriteRule ^published$ index.php [L]
RewriteRule ^published/(.*)/$ index.php?part=$1 [L]
RewriteRule ^published/(.*)/category/(.*)$ index.php?part=$1&category=$2 [L]

#misc
RewriteRule ^live$ live.php [L]
RewriteRule ^admin$ admin_index.php [L]
RewriteRule ^topusers$ topusers.php [L]
RewriteRule ^submit$ submit.php [L]
RewriteRule ^rss$ rss.php [L]

#outgoing
RewriteRule ^out/(.*)$ out.php?title=$1 [L]

#tags
RewriteRule ^tagcloud$ cloud.php [L]
RewriteRule ^tag/(.*)$ search.php?search=$1&tag=true [L]
RewriteRule ^tag/range/(.*)$ cloud.php?range=$1 [L]

RewriteRule ^user$ user.php [L]
RewriteRule ^user/view/(.*)/login/(.*)$ user.php?login=$2&view=$1 [L]
RewriteRule ^user/view/profile/(.*)$ user.php?login=$1 [L]

#sitemap module rewrites
RewriteRule ^sitemapindex.xml module.php?module=xml_sitemaps_show_sitemap [L]
RewriteRule ^sitemap-([0-9a-z]+).xml module.php?module=xml_sitemaps_show_sitemap&i=$1 [L]

#end

I may have missed some pages depending on the modules and your own configuration. (for example, there is not Adding Friends or Private Messenging support in the above code, but could be added easily.) Also, it is possible I missed rules, because pligg has different urls for items depending on configs and pligg version.

Hope it helps somebody.

Last edited by na3s; 04-20-2008 at 10:46 PM.
Reply With Quote