Spiga

PHPLinkDirectory Safe URL’S Mod-Rewrite

by Gabi Solomon

PHPLinkDirectory (phpLD) is the most used open source script for webdirectories. There is also an entire comunity that suport this script, and provide it with templates and mods. Some of the mods are free, but there are also payed ones but they are not that cheap 10-30$ ( the developer has to pay at least the electricity spent on the development of it :) )

One of the features of this script is the capacity to make Clean URL links, or Safe URL. This feature is a very useful for the site SEO (Search Engine Optimization). But some users don’t activate this feature because they end up by not being able to acces the directory’s and subdirectory’s or getting a 404 error mesage.

That basicly happens because the Rewrite Rule was not set. Those directory in the browser adress don’t realy exist they will be rewrited by the apache Mod_Rewrite. In order to do this you will need to edit the .htaccess file, which is to be located at the root directory of your phpLD website ( if there isnt one already, just create one ). Add the code below in the file :

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule .* index.php [QSA,L]

I hope it helps.

Related Posts

  • Dawzz
    the htaccess is included in the zip.
    You can find out more on the support forums.
  • Hi there, I just experimenting with Disqus, and I see we have two things in common, phpLD and and interest in Disqus. Thanks for writing about phpLD. Much appreciated!
  • I just found this article and i want to say THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU! I was playing for hours trying to get the SEO friendly URLS to work and this worked INSTANTLY. YOU ARE AMAZING. I hope you get to read this. THANKS SO MUCH!!!!!!
  • Hi there,
    I have tried your method in my phplinkdirectory script by editing the .htaccess. Still I dnt see any 404 page error. Can you tell me what file I should edit. Is it the .htaccess or the template itself - that handles the error pages.
blog comments powered by Disqus