![]() |
phpld seo friendly pages
If you are looking for the phpld seo friendly details pages mod click here.
With this small modification you can have seo friendly pages for the top links, latest links and latest articles. Actually this is already done in the .htaccess and all you have to do is to update your template to point to these pages. The file to modify is usually top-bar.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=latestarticles REPLACE BY: {$smarty.const.DOC_ROOT}/latest-articles.html FIND: {$smarty.const.DOC_ROOT}/index.php?list=top REPLACE BY: {$smarty.const.DOC_ROOT}/top-hits.html |
phpld SEO friendly details pages
With this simple mod you can include any field from the link table in the URL of the details page. So instead of having a URL that looks like http://rakcha.com/phpld//link-18.html you can have it look like
http://www.rakCha.com/phpld/Directories/enQuira-directory-18.html Implementation: in link.tpl FIND: Code:
{$smarty.const.DOC_ROOT}/detail/link-{$link.ID}.htmlCode:
{$smarty.const.DOC_ROOT}/{$link.CATEGORY_URL|escape|trim}FIND: Code:
preg_match ('#(.*)link(_|-)(\d+)\.htm[l]?$#i', request_uri(), $matches);Code:
preg_match ('#(.*)(_|-)(\d+)\.htm[l]?$#i', request_uri(), $matches);LOCATE the code between <IfModule mod_rewrite.c> and </IfModule> REPLACE BY: Code:
# URL rewrite rulesExtension: If you want to use any other field of the PLD_LINK Table, say you have a custom field for keywords named KEYWORDS, you can add {$link.KEYWORDS|escape|trim|replace:' ':'-'} to the URL. PS: If you want to convert the added fields like $link.TITLE to lower case, you will have to add strtolower to it. The URL becomes: Code:
{$smarty.const.DOC_ROOT}/{$link.CATEGORY_URL|escape|trim}Code:
RewriteCond %{REQUEST_URI} ^(.*)/detail/link-(.*)\.html$ENJOY! |
| All times are GMT +8. The time now is 09:11 PM. |
Powered by vBulletin Version 3.8.7
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.