View Single Post
  #7 (permalink)  
Old 08-06-2008, 04:34 PM
dlbrown06 dlbrown06 is offline
Junior Member
 
Join Date: Mar 2008
Posts: 11
Default

// Create a routers
$router = $frontController->getRouter(); // returns a rewrite router by default

// router for account activation
$router->addRoute('activation', new Zend_Controller_Router_Route_Regex('activate-(.+)-(\d+)\.htm', array('controller' => 'auth', 'action' => 'activation'), array(1 => "code", 2 => "id"), 'activate-%s-%d.htm'));
// router for articles
$router->addRoute('article', new Zend_Controller_Router_Route_Regex('(\d+)/(\d+)/(\d+)/(.+)-(\d+)\.htm', array('controller' => 'article', 'action' => 'index'), array(1 => "year", 2 => "month", 3 => "day", 4 => "title", 5 => "articleId"), '%d/%d/%d/%s-%d.htm'));
// router for affiliates
$router->addRoute('affiliate', new Zend_Controller_Router_Route('affiliate/:aff/', array('controller' => 'affiliate', 'action' => 'index')));
// router for blog category
$router->addRoute('blog', new Zend_Controller_Router_Route('blog', array('controller' => 'index', 'action' => 'category', "category" => "blog")));
// router for technology category
$router->addRoute('technology', new Zend_Controller_Router_Route('technology', array('controller' => 'index', 'action' => 'category', "category" => "technology")));
// router for entertainment category
$router->addRoute('entertainment', new Zend_Controller_Router_Route('entertainment', array('controller' => 'index', 'action' => 'category', "category" => "entertainment")));
// router for sports category
$router->addRoute('sports', new Zend_Controller_Router_Route('sports', array('controller' => 'index', 'action' => 'category', "category" => "sports")));
// router for lifestyle category
$router->addRoute('lifestyle', new Zend_Controller_Router_Route('lifestyle', array('controller' => 'index', 'action' => 'category', "category" => "lifestyle")));
// router for science category
$router->addRoute('science', new Zend_Controller_Router_Route('science', array('controller' => 'index', 'action' => 'category', "category" => "science")));
// router for business category
$router->addRoute('business', new Zend_Controller_Router_Route('business', array('controller' => 'index', 'action' => 'category', "category" => "business")));
// router for gaming category
$router->addRoute('gaming', new Zend_Controller_Router_Route('gaming', array('controller' => 'index', 'action' => 'category', "category" => "gaming")));
// router for offbeat category
$router->addRoute('offbeat', new Zend_Controller_Router_Route('offbeat', array('controller' => 'index', 'action' => 'category', "category" => "offbeat")));
// router for feature
$router->addRoute('feature', new Zend_Controller_Router_Route_Static('feature', array('controller' => 'index', 'action' => 'feature')));
// router for the buy content page
$router->addRoute('buy-content', new Zend_Controller_Router_Route_Static('buy-content', array('controller' => 'index', 'action' => 'content')));
// router for newsletter
$router->addRoute('newsletter', new Zend_Controller_Router_Route_Static('newsletter', array('controller' => 'index', 'action' => 'newsletter')));
// router for Buying a cup of coffee
$router->addRoute('donation', new Zend_Controller_Router_Route_Static('donation', array('controller' => 'index', 'action' => 'donation')));
// router for Registration
$router->addRoute('register', new Zend_Controller_Router_Route_Static('register', array('controller' => 'index', 'action' => 'register')));
// router for About Page
$router->addRoute('about', new Zend_Controller_Router_Route_Static('about', array('controller' => 'index', 'action' => 'about')));
// router for Contact Page
$router->addRoute('contact', new Zend_Controller_Router_Route_Static('contact', array('controller' => 'index', 'action' => 'contact')));
// router for Advertising Page
$router->addRoute('advertise', new Zend_Controller_Router_Route_Static('advertise', array('controller' => 'index', 'action' => 'advertise')));
// router for search
$router->addRoute('search', new Zend_Controller_Router_Route_Static('search', array('controller' => 'index', 'action' => 'search')));
// router for tos
$router->addRoute('tos', new Zend_Controller_Router_Route_Static('tos', array('controller' => 'index', 'action' => 'tos')));
// router for FAQ
$router->addRoute('faq', new Zend_Controller_Router_Route_Static('faq', array('controller' => 'index', 'action' => 'faq')));
// router for sitemap
$router->addRoute('sitemap', new Zend_Controller_Router_Route_Static('sitemap', array('controller' => 'index', 'action' => 'sitemap')));
// router for disclaimer
$router->addRoute('disclaimer', new Zend_Controller_Router_Route_Static('disclaimer', array('controller' => 'index', 'action' => 'disclaimer')));
// router for privacy
$router->addRoute('privacy', new Zend_Controller_Router_Route_Static('privacy', array('controller' => 'index', 'action' => 'privacy')));
// router for RSS Feed
$router->addRoute('feed', new Zend_Controller_Router_Route_Regex('rss/[0-9+]\.xml', array('controller' => 'rss', 'action' => 'feed'), array(1 => "feedId"), 'rss/%d.xml'));
// router for topic RSS Feeds
$router->addRoute('feed', new Zend_Controller_Router_Route_Regex('rss/(.+)\.xml', array('controller' => 'rss', 'action' => 'feed'), array(1 => "feedId"), 'rss/%s.xml'));
// router for xml sitemaps
$router->addRoute('sitemapxml', new Zend_Controller_Router_Route_Static('sitemap.xml', array('controller' => 'index', 'action' => 'sitemapxml')));

I cannot think of anyway I can fix this situation short of changing the urls for everything?! Should I just forget it, suck up my pride, lose the link equity I built in those urls and just have them redone?
Reply With Quote