EMLOG remove sort method pseudo-static URL classification

After EMLOG use pseudo-static, URL address classification There is a sort words, that so many people really unhappy, and all want to get rid of this sort; EMLOG want to remove the pseudo-static URL classification of sort, be it via FTP download source files EMLOG program OK, enter include landing FTP folder, found in the lib folder dispatcher.php and url.php both files downloaded to the local, using the editor to open, modify the code in accordance with the following method on it; this method for emlog5 to be effective, if not modify the code, I can download the edited version of the emlog5.3.1 two source files upload coverage on it, upload it to the web root directory include / lib folder, remove the sort, navigate through FTP current category navigation menu highlight will fail.

  1. First, use the editor to open url . PHP file
  2. turn up
  3. $sortUrl = BLOG_URL . 'sort/' . $sort_index;
  4. Change
  5. $sortUrl = BLOG_URL. $sort_index;
  6. turn up
  7. $sortUrl = BLOG_URL . 'sort/' . $sort_index . '/page/';
  8. Change
  9. $sortUrl = BLOG_URL . $sort_index . '/page/';
  10.  
  11. Second, using the editor the Dispatcher . PHP file
  12. turn up
  13. return $path;
  14. Replaced
  15. if($path!="/"&&substr($path,0,6)!="/sort/"&&substr($path,0,2)!="/?") {
  16. return "/sort".$path;
  17. } else {
  18. return $path;
  19. }
 

Guess you like

Origin www.cnblogs.com/pz2133/p/11905903.html