SEO friendly url for regular pages such as latest links page:
This trick is from http://blog.rakcha.com/2007/05/03/phpld-seo-friendly-pages/ , thanks to the admin who provides the code for free.
If you are using the default template or some other templates, usually look into top-bar.tpl, however, as I was using this sunnyblue template, the top menu is found in the header.tpl
FIND: {$smarty.const.DOC_ROOT}/index.php?list=latest
REPLACE BY:{$smarty.const.DOC_ROOT}/latest-links.html
FIND: {$smarty.const.DOC_ROOT}/index.php?list=top
REPLACE BY: {$smarty.const.DOC_ROOT}/top-hits.html
FIND: {$smarty.const.DOC_ROOT}/index.php?list=latestarticles
REPLACE BY: {$smarty.const.DOC_ROOT}/latest-articles.html
You only need to change the URL of latest article URL if you use phpLD 3.2.
Make sure you add the following code in your .htaccess after RewriteBase/
##Latest Links Rewrite
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^latest-links\.html?$ index.php?list=latest [QSA,NC,L]##Top Hits Rewrite
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^top-hits\.htm[l]?$ index.php?list=top [QSA,NC,L]
For phpLD Version 2x, use the following code in your .htaccess:
##Latest Links Rewrite
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^latest-links\.html?$ index.php?p=d [QSA,NC,L]##Top Hits Rewrite
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^top-hits\.htm[l]?$ index.php?p=h [QSA,NC,L]
You can look at my demo pages here:
Latest listings page, Top Listings page
This modification is simply, not only you want pages like that to be friendly, you also want the detailed listing page to be friendly as well so it gives more incentive for webmasters. Check here for SEO friendly details pages.
