May 3rd, 2007phpld 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/Paid_Web_Directories/enQuira-directory-25.html
Implementation:
in link.tpl
FIND:
{$smarty.const.DOC_ROOT}/detail/link-{$link.ID}.html
REPLACE BY (this is 1 line, there is no line break!):
{$smarty.const.DOC_ROOT}/{$link.CATEGORY_URL|escape|trim}
{$link.TITLE|escape|trim|replace:' ':'-'}-{$link.ID}.html
in detail.php
FIND:
preg_match ('#(.*)link(_|-)(\d+)\.htm[l]?$#i', request_uri(), $matches);
REPLACE BY:
preg_match ('#(.*)(_|-)(\d+)\.htm[l]?$#i', request_uri(), $matches);
The following line should be
$id = (!empty ($matches[3]) ? intval ($matches[3]) : 0);
So if you have $matches[1] replace it to $matches[3] for both instances.
in .htaccess
LOCATE the code between <IfModule mod_rewrite.c> and </IfModule>
REPLACE BY:
# URL rewrite rules
<IfModule mod_rewrite.c>
RewriteEngine On
#Make sure RewriteBase points to the directory where you installed phpLD.
#Example: "/phpld" if your installation is in a "phpld" subdirectory.
RewriteBase /
##Latest Links Rewrite
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^latest-listings\.htm[l]?$ index.php?list=latest [QSA,NC,L]
##Top Hits Rewrite
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^popular-listings\.htm[l]?$ index.php?list=top [QSA,NC,L]
##Latest Articles Rewrite
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^latest-articles\.html$ index.php?list=latestarticles [QSA,NC,L]
##Pagination Rewrite
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule (.*)page-[0-9]+\.html$ index.php/?p=$2 [QSA,NC,L]
##Article Page Rewrite
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule (.*)articles/article-(.*)\.htm[l]?$ article.php [QSA,NC,L]
##Details Link Page Rewrite
RewriteRule %{REQUEST_URI} !page-[0-9]+\.html?$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^(.*)\.html$ detail.php [NC,QSA,L]
##Category redirect
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^(.*)$ index.php [QSA,L]
</IfModule>
That’s it, you are done!
Extension: 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:
{$smarty.const.DOC_ROOT}/{$link.CATEGORY_URL|escape|trim}
{$link.TITLE|escape|trim|strtolower|replace:' ':'-'}-{$link.ID}.html
PS2: To redirect old pages to your directory home, add the following in .htaccess
RewriteCond %{REQUEST_URI} ^(.*)/detail/link-(.*)\.html$
RewriteRule ^(.*)$ http://www.yourdirectory.com/ [R=301,L]
It is not possible to redirect old pages to new pages as the listing title or category are not available at the htaccess level. However this will not cause a problem as old pages will be promtply deindexed thanks to the 301 redirect to the homepage, and new pages indexed without causing duplicate content.
ENJOY!
89 Responses to “phpld SEO friendly details pages”
Leave a Reply
You must be logged in to post a comment.


May 3rd, 2007 at 3:16 am
Does this work for all versions?
May 3rd, 2007 at 3:23 am
yes. for all versions that have details pages.
May 3rd, 2007 at 10:20 am
Works fine, keep going…
May 3rd, 2007 at 11:54 am
I am getting “No input file specified. ” can you please help me. I have uploaded site at http://www.creepweb.com
May 3rd, 2007 at 11:58 am
This assumes that you have the details page running. So you should solve that problem before applying the mod.
May 3rd, 2007 at 12:01 pm
can you please guide me what i have to do? i have just reinstalled the directory script.
May 3rd, 2007 at 12:13 pm
should i re-install script ?
May 15th, 2007 at 11:11 pm
A suggestion : why not use smarty truncate option too? It’d make super long titles truncated to say, 40 characters.
May 18th, 2007 at 4:14 am
After carrying out the detail.php step I also had to modify the line below to ensure that the correct ID was selected. This is on phpLD v3.0.6:
From:
preg_match (’`link-(\d+)\.htm[l]?$`’, request_uri(), $matches);
// Determine link ID
$id = (!empty ($matches[1]) ? intval ($matches[1]) : 0);
To:
preg_match (’#(.*)(_|-)(\d+)\.htm[l]?$#i’, request_uri(), $matches);
// Determine link ID
$id = (!empty ($matches[3]) ? intval ($matches[3]) : 0);
Otherwise the ID would always be empty. Hope that helps someone else out.
May 20th, 2007 at 12:13 am
Thanks for your contribution SilkySmooth, I didn’t have a chance to test my code on 3.0.6 but it is working fine for 3.2
June 4th, 2007 at 7:35 pm
Hi, It is really working great on my v3.2 phpld.
June 8th, 2007 at 3:00 pm
Hi i cant see this file “{$smarty.const.DOC_ROOT}/detail/link-{$link.ID}.html” at phpld version 2.. please advice..
June 9th, 2007 at 12:21 am
Kojak, are the detail pages available for version 2?
June 9th, 2007 at 10:46 am
Ooops sorry for that.. forget my question in this.. i will try it now at my directory using ver. 3
thanks
June 9th, 2007 at 12:26 pm
Hi i just installed the script but im getting this http://www.kojakdirectory.com/Business/Real_Estate/HomesDubai.com-27.html
the information of the website are not appearing…
please advice admin..
thanks
June 9th, 2007 at 1:48 pm
Hi Kojak,
Since you’re not using 3.2, did you try the fix by SilkySmooth above?
http://blog.rakcha.com/2007/05/03/phpld-seo-friendly-details-pages/#comment-32
Otherwise I will have a look at version 3.1 and post here.
June 10th, 2007 at 6:10 am
Hi all,
i can’t find the:
preg_match (’#(.*)link(_|-)(\d+)\.htm[l]?$#i’, request_uri(), $matches);
in the detail.php
i have the vesrion 3.0.5
can someone help me?
June 10th, 2007 at 7:24 pm
This works perfect in 3.2, as others have posted, thank you very much!
June 11th, 2007 at 2:53 am
This mod works great for me.. as i promise to the admin i approve your link here http://www.kojakdirectory.com/Reference/Directories/rakCha-web-directory-47.html
thanks for this..
June 16th, 2007 at 12:16 pm
It would be nice to get a working version of this for 2.x details
there are some mods out there that allow detail pages for 2.x versions just to let ya’ll know.
June 16th, 2007 at 6:17 pm
but i’d like to say thinks
just got this working on my 3.2 directory, would still like to know how to make it work for a 2.x using vsdan’s or anyone elses mod.
June 17th, 2007 at 8:00 pm
Thank you very much for this mod.
Very long time i search seo mod and ask another phpLD directories owners and without results.
I’ll try to install it.
Thank you.
June 19th, 2007 at 9:07 pm
Not working on phpld 3.2 when you have more than 1 page, when you click page 2 it fails to display the page.
June 20th, 2007 at 12:50 am
!ask!, this is from a pm I sent you on May 5th.
as specified above, this line in .htaccess should solve that problem:
RewriteCond %{REQUEST_URI} !^(.*)page-(\d+)\.htm[l]?(.*)$
June 25th, 2007 at 5:06 pm
Hi all,
i can’t find the:
preg_match (’#(.*)link(_|-)(\d+)\.htm[l]?$#i’, request_uri(), $matches);
in the detail.php
i have the vesrion 3.0.5
can someone help me?
June 25th, 2007 at 6:53 pm
Alex, this should in the beginning of the file /detail.php
June 26th, 2007 at 6:06 am
yes, but my code shows like this:
assign(’error’, “Invalid Link ID”);
else
{
$rdata = $db->GetRow(”SELECT *, DATE_FORMAT(DATE_ADDED, ‘%M %d, %Y %r’) AS `DAT` FROM `{$tables['link']['name']}` WHERE `ID` = “.$db->qstr($id));
$data = array ();
if (!$rdata)
$tpl->assign(’error’, “Invalid ID [{$id}] passed - not found in database”);
else
{
and i dont have the same code than preg_match (’#(.*)link(_|-)(\d+)\.htm[l]?$#i’, request_uri(), $matches);
Wgat can i do? please,
example of my directory, http://www.1000enlaces.com/index.php?list=latest when you click a link, for example the first, and click in more information, in spanish, mas información, redirect to the index.
June 26th, 2007 at 6:07 am
sorry, the code of detail.php shows like this:
assign(’error’, “Invalid Link ID”);
else
June 26th, 2007 at 6:11 am
omg i cant submit the correct code in this coment, ok, i show you in a picture ok?, http://www.1000enlaces.com/problem.bmp
thanks
June 26th, 2007 at 8:44 am
i find a code similar but not the same in index.php
// Determine page number and current page index
if (ENABLE_REWRITE == 1 && !isset ($_REQUEST['search'])) // Rewrited page links
{
preg_match (”/page-(\d+)\.htm[l]?$/”, request_uri(), $matches);
// Determine current index
$page = (!empty($matches[1]) ? intval ($matches[1]) : 1);
// Determine page
$current_item = PAGER_LPP * $page - PAGER_LPP;
but its not in detail.php
June 28th, 2007 at 11:34 am
im also having the paging problem when using this.. the page links to the detail listing with the same id. Is there a fix for this ?
Try clicking page 2 at the bottom of this page to see what i mean:
http://www.thefreewebsitedirectory.co.uk/business/Financial_Services/
Thanks
June 28th, 2007 at 11:39 am
I cant access page 2 after installing this mod. Here’s an example:
http://www.emillie.net/Web_Directories/Paid/page-2.html
Btw, I’ve carefully followed the instructions above.
June 28th, 2007 at 12:19 pm
Here is what I have in my .htaccess and it works fine
##Details Link Page Rewrite
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteCond %{REQUEST_URI} !^(.*)page-(\d+)\.htm[l]?(.*)$
RewriteRule (.*)-(.*)\.htm[l]?$ detail.php [QSA,NC]
demo
Make sure you have this
RewriteCond %{REQUEST_URI} !^(.*)page-(\d+)\.htm[l]?(.*)$This will prevent next pages from being forwarded to detail pages.
If someone wants me to look into his directory contact me. so I can post the solution for everybody.
June 28th, 2007 at 12:24 pm
Hi, where do you have this in the .htaccess exactly…
i have mine just below the paignation rewrite rules and have copied exactly what you put above but still having the same issue.
June 28th, 2007 at 12:38 pm
I think you found it madtay,
this should be placed above the code for Pagination Rewrite. sorry for not mentioning this.
June 28th, 2007 at 12:44 pm
Ok tried that too and im still having the same issue.
I will set up and send ftp details to you if you will be able to have a look into it? as i cant see where its going wrong..
June 28th, 2007 at 12:46 pm
Also just came across thing when asking about rewrite for the article link on the phpld forum…..
Quote:
——
the basic thing is to remember that if it hits a match it stops there (usually) so it was hitting the * - * one and it matched.
Could this be happening with the paignation and detail rewrite ?
Im not sure what it means but it may help get to the bottom of it…
June 28th, 2007 at 7:34 pm
yes could you send me your ftp so I can check the .htaceess.
June 28th, 2007 at 7:44 pm
i will use the contact form to send them now
June 28th, 2007 at 7:58 pm
Details sent, thanks.
Just an idea too, perhaps if you could suggest a way to add for example /details/ in front it wouldnt conflict with anything? not sure though just thinking out loud..
http://www.thefreewebsitedirectory.co.uk/sports/Golf/Golf-Training-Aids-109.html
could become..
http://www.thefreewebsitedirectory.co.uk/sports/Golf/details/Golf-Training-Aids-109.html
June 28th, 2007 at 9:13 pm
I asked mod rewrite experts about this. I will post here the solution when I get it.
June 28th, 2007 at 9:16 pm
thankyou, look forward to finding the solution.
June 29th, 2007 at 5:06 pm
My htaccess looks exactly like yours. However, an email has been sent to you regarding this matter.
June 29th, 2007 at 9:50 pm
I can’t believe I got this to work, ouff!
detail page:
http://www.emillie.net/Business/Transportation/Penske-Truck-Leasing-379.html
page 2:
http://www.emillie.net/Web_Directories/Paid/page-2.html
This is the rewrite rules part of .htaccess
June 30th, 2007 at 9:18 am
You’re awesome! Problem solved asap =) Thanks for your effort.
June 30th, 2007 at 10:57 am
Hi
My link.tpl shows-
Where do I make changes?
June 30th, 2007 at 10:59 am
Hi. I also have link-detail.tpl as follows-
June 30th, 2007 at 7:59 pm
Hey,
I have a question.
I installed the mod: http://www.nimadirectory.com,
but the detail pages have a “20%” (blank space) in front of every detail page. Is there anyway to fix that?
Thanks a lot
June 30th, 2007 at 8:35 pm
Ketan, I don’t know which version you are using but it should be this:
{$smarty.const.DOC_ROOT}/details/link-{$link.ID}are you sure there is no .html there?
@Nima, make sure
{$smarty.const.DOC_ROOT}/{$link.CATEGORY_URL|escape|trim}{$link.TITLE|escape|trim|replace:' ':'-'}-{$link.ID}.htmlis one line and there is no space between
{$link.CATEGORY_URL|escape|trim}and{$link.TITLE|escape|trim|replace:' ':'-'}Also use the .htaccess in my last comment, it solves the issue mentioned above.
July 1st, 2007 at 6:00 pm
You were right. I had a space between the lines. Thanks for the fix.
Also I listed your website under my phpLD Mods page: http://www.nimadirectory.com/phpld-directory-mods.php
Nima
July 1st, 2007 at 6:04 pm
Thanks a lot Nima, I really appreciate it.
July 4th, 2007 at 10:18 am
Hi I have PHPLD 2 free version.
I added a mod for link-detail.tpl as mentioned above. Please help.
July 4th, 2007 at 10:30 am
Hi. I have added link-detail.tpl from
http://goodprlinks.com/reviews/2007-05-24/link-detail-mod-for-phpld-v20.html
July 5th, 2007 at 4:34 pm
hello i have some problems. i do not get rewrited INDEX. check: http://links.hotvictory.com . can u give me an advice? i made all that mod says. i edited all files.
July 6th, 2007 at 2:12 am
I could see your problem as your site is down now. Applying the changes in the mod should be enough to get it working.
July 14th, 2007 at 7:25 pm
Hey!
Awsome mod, but I did everything as written and I get an error:
Not Found
The requested URL /detail.php was not found on this server.
Any ideas what could be wrong?
July 14th, 2007 at 7:33 pm
actually never mind I forgot to change the rewritebase.
July 21st, 2007 at 10:54 pm
Hi my friend.This is really wonderful mod and “what i need” exactly. But i am using 3.0.6 Beta 2 and i cant find the things on detail.php like alex.
Maybe in 3.0.6 there is (SilkySmooth Says) but i cant find on my version, like 3.0.5 .Can you have a look or help us? Really want this
August 5th, 2007 at 9:35 pm
Hey,
I just tried to install this in my new directory and I think the .htaccess is destroying my whole directory…
Can you take a look at it? I already installed this mod fine on two other directories, but I dont know why it doesn’t work on this one.
Thanks
Nima
August 8th, 2007 at 11:00 am
it working great in my directory. Thank a lot !!
August 20th, 2007 at 12:12 am
Any chance for a fix for the page-2 issue in 3.2? I continue to get the error. Aside from that works great. Here is what my htaccess has if you could add the corrected part to it I would appreciate it.
##Latest Links Rewrite
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^latest-links\.htm[l]?$ index.php?list=latest [QSA,NC,L]
##Featured Links Rewrite
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^featured-links\.htm[l]?$ index.php?list=featured [QSA,NC,L]
##Sitemap Links Rewrite
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^sitemap\.htm[l]?$ sitemap.php [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]
##Latest Articles Rewrite
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^latest-articles\.htm[l]?$ index.php?list=latestarticles [QSA,NC,L]
##Details Link Page Rewrite
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule (.*)detail/link-(.*)\.htm[l]?$ detail.php [QSA,NC]
##Article Page Rewrite
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule (.*)articles/article-(.*)\.htm[l]?$ article.php [QSA,NC]
##Pagination Rewrite
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule (.*)page-(\d+)\.htm[l]?(.*)$ $1/?p=$2 [PT,NC]
##Category redirect
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^(.*)$ index.php [QSA,L]
The mod was removed for now tell I get a fix
August 27th, 2007 at 5:19 pm
Hey, Did you ever get a chance to take a look at my directory?
Thanks
Nima
September 4th, 2007 at 1:29 pm
Thanks mate. I installed it and it works totally fine
September 4th, 2007 at 5:58 pm
Hello,
First of all, thank you very much for this very good MOD.
I´m only having a problem with the spanish caracters in my detail.tpl url.
An example is http://www.guiacaninadecadiz.es/cadiz/veterinarios/clinica-veterinaria-plaza-de-espa%D1a-7.html
Notice at the end espa%D1a, this should be simply espana. The original title of this entry is CLINICA VETERINARIA PLAZA DE ESPAÑA.
Also notice in the same example-url /cadiz/, this is the category title. Originally this title is Cádiz but apparantly is rewritten correctly to cadiz.
What can I do to make sure the caracters like í, á, ú and ñ are rewritten into i,a, u and n?
Greetings.
September 6th, 2007 at 7:35 am
Hello again,
Just in case this might come in handy to someone else, the solution is changing
{$smarty.const.DOC_ROOT}/{$link.CATEGORY_URL|escape|trim}
{$link.TITLE|escape|trim|replace:’ ‘:’-'}-{$link.ID}.html into
{$smarty.const.DOC_ROOT}/{$link.CATEGORY_URL|escape|trim}{$link.TITLE|escape|trim|strtolower|replace:’ ‘:’-'|replace:’á’:'a’|replace:’é’:'e’|replace:’í’:'i’|replace:’ó’:'o’|replace:’ñ’:'n’|replace:’ú’:'u’|replace:’Á’:'a’|replace:’É’:'e’|replace:’Í’:'i’|replace:’Ó’:'o’|replace:’Ñ’:'n’|replace:’Ú’:'u’}-{$link.ID}.html
Greetings.
September 29th, 2007 at 1:29 pm
This does not work for me.
For more details please see http://www.phplinkdirectory.com/forum/showthread.php?p=94360#post94360
Can you please help, whatever details you need I can pass on.
October 5th, 2007 at 8:00 am
Hi!
mod works great, but not for featured links I think.
Any comment to that?
Have a good time …
October 5th, 2007 at 2:12 pm
That’s because the featured links are handled by another file in your template. Look for a file similar to link.tpl and make the same changes to it.
November 1st, 2007 at 8:30 am
I’ve installed the mod, but in details pages my path is (for instance):
rakCha » View Link
instead of being:
rakCha » Internet » Directories » View Link
Should I change anything in detail.php or index.php or…
November 1st, 2007 at 4:48 pm
Could you show where you installed this?
November 1st, 2007 at 6:32 pm
Sure: http://www.fokkers.nl/harrie-mensink-11.html (btw: ‘fokkers’ (dutch) means ‘breeders’) I’ve changed detail.php (as a temporary patch) to show search ‘zoeken’ as part of the path. My problem is probably caused by too much modification… but if anybody has an idea… please.
November 1st, 2007 at 6:46 pm
Actually that’s the case even before applying the mod. This is how the breadcrumb of phpld is constructed in the top-bar.tpl template file. You can change It using the split categories mod you already have installed.
November 1st, 2007 at 11:12 pm
Thanks for leading the way, it was a bit of a puzzle but it works just fine now!
November 7th, 2007 at 11:35 am
[...] a look * Complete List of Free PHPld Mods*by*Directory Trials PHPld SEO friendly details pages :: Installation :: Demo I hope it will work for you, btw there are paid mods too for the same work, anon (Rob) [...]
November 11th, 2007 at 7:35 pm
Any chance for a fix for the page-2 issue in 3.2? I continue to get the error. Aside from that works great. Here is what my htaccess has if you could add the corrected part to it I would appreciate it.
# Prevent .htaccess and .htpasswd files from being viewed by web clients
Order allow,deny
Deny from all
# Protect files
Order deny,allow
Deny from all
# Protect directories
Order deny,allow
Deny from all
# Disable directory browsing
Options -Indexes
# Follow symbolic links in this directory
Options +FollowSymLinks
# Override PHP settings that cannot be changed at runtime
# (If your server supports PHP settings via htaccess you can comment following two lines off)
# php_value register_globals 0
# php_value session.auto_start 0
# Customized error messages
# ( If you are running in a subfolder please add it, example: “directory/index.php?httpstatus=404″ )
ErrorDocument 404 index.php?httpstatus=404
# Set the default handler
DirectoryIndex index.php
# URL rewrite rules
RewriteEngine On
#Make sure RewriteBase points to the directory where you installed phpLD.
#Example: “/phpld” if your installation is in a “phpld” subdirectory.
RewriteBase /
##Latest Links Rewrite
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^latest-listings\.htm[l]?$ index.php?list=latest [QSA,NC,L]
##Top Hits Rewrite
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^popular-listings\.htm[l]?$ index.php?list=top [QSA,NC,L]
##Latest Articles Rewrite
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^latest-articles\.html$ index.php?list=latestarticles [QSA,NC,L]
##Pagination Rewrite
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule (.*)page-[0-9]+\.html$ index.php/?p=$2 [QSA,NC,L]
##Article Page Rewrite
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule (.*)articles/(.*)\.html$ article.php [NC,QSA,L]
##Details Link Page Rewrite
RewriteRule %{REQUEST_URI} !page-[0-9]+\.html?$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^(.*)\.html$ detail.php [NC,QSA,L]
##Category redirect
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^(.*)$ index.php [QSA,L]
November 11th, 2007 at 8:04 pm
That issue was fixed with the .htaccess above. If you could list the url where you are trying this it would be helpful.
November 11th, 2007 at 10:52 pm
now i have URL rewrite Off
but if you want pm and i give you the url and i turn url rewrite ON
November 12th, 2007 at 6:58 am
problem fixed
this is my .htaccess now
RewriteEngine On
#Make sure RewriteBase points to the directory where you installed phpLD.
#Example: “/phpld” if your installation is in a “phpld” subdirectory.
RewriteBase /
##Latest Links Rewrite
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^latest-listings\.htm[l]?$ index.php?list=latest [QSA,NC,L]
##Top Hits Rewrite
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^popular-listings\.htm[l]?$ index.php?list=top [QSA,NC,L]
##Latest Articles Rewrite
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^latest-articles\.html$ index.php?list=latestarticles [QSA,NC,L]
##Pagination Rewrite
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule (.*)page-(\d+)\.htm[l]?(.*)$ $1/?p=$2 [PT,NC]
##Article Page Rewrite
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule (.*)articles/(.*)\.html$ article.php [NC,QSA,L]
##Details Link Page Rewrite
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^(.*)\.html$ detail.php [NC,QSA,L]
##Category redirect
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^(.*)$ index.php [QSA,L]
November 12th, 2007 at 10:47 pm
If you have access to .htaccess through ftp or ssh you can send me the login I will have a look.
RewriteRule (.*)page-(\d+)\.htm[l]?(.*)$ $1/?p=$2 [PT,NC]
Should be
RewriteRule (.*)page-(\d+)\.html$ index.php/?p=$2 [QSA,NC,L]
November 13th, 2007 at 10:55 am
pm sent with ftp access
November 13th, 2007 at 11:47 am
I used these rewrite rules, it should be fine now.
November 13th, 2007 at 1:29 pm
yes is fine
thank you
i go to drink a beer in your honor
November 17th, 2007 at 7:42 am
Hello,
I have two links for detail page:
directory.com/title-11.html (link in homepage)
directory.com/category/title-11.html (link in category)
How can I have same link in homepage and category?
I want this link in homepage: directory.com/category/title-11.html
Thanks for your help.
November 17th, 2007 at 9:26 am
I template file used to display the links in the homepage is not link.tpl, you should edit that file as well like you did for link.tpl
November 19th, 2007 at 1:23 pm
I have phpLD 3.2 with Bid Position. When you have more than 1 page, when you click page 2 it fails to display the page. Can you help me, please?
This is my .htaccess:
RewriteEngine On
#Make sure RewriteBase points to the directory where you installed phpLD.
#Example: “/phpld” if your installation is in a “phpld” subdirectory.
#RewriteBase /
## A-Z Links Rewrite##
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule (.*)alpha-(.*)/ index.php?letter=$2 [QSA,NC]
## Pagerank Stats Rewrite##
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule (.*)livepagerank-(.*)/ index.php?pr=$2 [QSA,NC]
##Latest Links Rewrite
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^latest-links\.htm[l]?$ 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]
##Latest Articles Rewrite
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^latest-articles\.htm[l]?$ index.php?list=latestarticles [QSA,NC,L]
##Details Link Page Rewrite
RewriteRule %{REQUEST_URI} !page-[0-9]+\.html?$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^(.*)\.html$ detail.php [NC,QSA,L]
##Article Page Rewrite
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule (.*)articles/article-(.*)\.htm[l]?$ article.php [QSA,NC]
##Pagination Rewrite
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule (.*)page-[0-9]+\.html$ index.php [QSA,NC,L]
##Category redirect
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^(.*)$ index.php [QSA,L]
November 19th, 2007 at 1:46 pm
Simply because you are not using the correct rules as above.
The pagination rewrite rules should be placed above those of the details page rules. like this:
December 13th, 2007 at 5:01 pm
hello,
i have one problem with this mod
phpld 3.2
the details link look like this
http://www.austernpower.de/index.php?c=1Akupunktur-Informationen-auf-Chirurgie-Portal-4.html
can you help me to fix this problem
the part index.php?c=1 must be removed
sorry for my english
tom
January 5th, 2008 at 6:39 pm
Guys;
I’m using phpLD v-2.1.3, and that version doesn’t have the detail page, i installed from goodprlinks.com this location, and its doesn’t shows the title page, and i really want to use this mode to fix the title and the title in the link.
is there anybody can help me to fix this problem
Thanks in advance…
uuStuff.com
February 7th, 2008 at 12:21 am
Great topic and probably the Mod.
Is it also working for phpld version 3.3 ?
Thanking in advance