August 28th, 2007phpLD - SEO friendly article pages
With this MOD, your article pages urls will contain the title of the article for better search engine optimization.
1 in .htaccess
FIND
##Article Page Rewrite
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule (.*)articles/article-(.*)\.htm[l]?$ article.php [QSA,NC]
REPLACE BY
##Article Page Rewrite
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule (.*)articles/(.*)\.html$ article.php [NC,QSA,L]
If you have installed the mod for seo friendly details pages, please place this code above the rewrite rules for the details pages which begin with
##Details Link Page Rewrite
2. in /article.php
FIND
preg_match ('#(.*)article(_|-)(\d+)\.htm[l]?$#i', request_uri(), $matches);
REPLACE BY
preg_match('#articles/(.*)(_|-)(\d+)\.htm[l]?$#i',request_uri(),$matches);
in /templates/your_template/articlelink.tpl
FIND
article-{$article.ID}.html
REPLACE BY
{$article.TITLE|replace:" ":"-"}-{$article.ID}.html

