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
4 Responses to “phpLD - SEO friendly article pages”
Leave a Reply
You must be logged in to post a comment.


August 29th, 2007 at 7:01 am
Thanks for this great MOD. I have already installed it on my web directory.
September 23rd, 2007 at 1:59 pm
Thanks for the Mod, it works perfect.
But just a small problem.
I have another mod installed which is “site of the day” mod from directory share, and it still shows the link to the old style article page. I tried to change the link URL but nothing worked.
The articleoftheday.tpl has following URL:
{$article.TITLE|escape|trim}
What do I need to change here? Or do I need to change something in htaccess.?
Also same problem with seo friendly detail mod as well when I add Site of the day.
April 11th, 2008 at 10:23 am
hello,
will this mod work for the phpld 3.3
waiting for your reply,
April 18th, 2008 at 11:36 am
I have installed phpld 3.3.0 and at article pages i get this error
“Error: No ID parameter” after i used you information provided above.
Can you help me?