(#1)
c0rrupt Offline
Administrator
 
Posts: 201
Join Date: Mar 2010
Location: Canada
Improve the SEO on your site (WcDDL V2) - 07-04-2012, 03:31 PM

Some modifications to improve the SEO on your site.

Add to .htaccess

PHP Code:
RewriteEngine On
Options 
+FollowSymlinks
RewriteRule 
^index.html$ /index.php [QSA,L,NC]
RewriteRule ^download-([^/]+)-([^/]+).html download.php?id=$[QSA,L,NC

Open funcs.php and find

PHP Code:
mysql_query("INSERT INTO wcddl_queue (sid,title,type,url) VALUES ('".mysql_real_escape_string($sid)."','".mysql_real_escape_string($titles[$i])."','".mysql_real_escape_string($types[$i])."','".mysql_real_escape_string($urls[$i])."')"); 

Replace with

PHP Code:
mysql_query("INSERT INTO wcddl_queue (sid,title,type,url) VALUES ('".mysql_real_escape_string($sid)."','".mysql_real_escape_string(remove_words($titles[$i]))."','".mysql_real_escape_string($types[$i])."','".mysql_real_escape_string($urls[$i])."')"); 

Find

PHP Code:
?> 

Add on a new line before

PHP Code:
function remove_words($str){
$replace_str '';
$bad_words = array('DVDRIP','XviD','Limited DVDRip','DvDrip-aXXo','aXXo','PROPER','Rip','Cam','\!','\?','\#');

    if (!
is_array($bad_words)){ $bad_words explode(' '$bad_words); }
    for (
$x=0$x count($bad_words); $x++){
     
$fix = isset($bad_words[$x]) ? $bad_words[$x] : '';
     
$_replace_str $replace_str;
     if (
strlen($replace_str)==1){
     
$_replace_str str_pad($_replace_strstrlen($fix), $replace_str);
     }
     
$str preg_replace('/'.$fix.'/i'$_replace_str$str);
     
$string preg_replace('/[\s]+/''-'$string);
    }
    return 
$str;

Open index.php and Find

PHP Code:
<a href="download.php?id=<?=$dl['id']?>"><?=$dl['title']?></a>

Replace with
PHP Code:
<a href="download-<?=$dl['id']?>-<?=str_replace(" ","-",$dl[title])?>.html"><?=$dl[title]?></a>


Before doing any edits to your DDL Site always make a BACKUP first.

Bookmarks

Tags
improve, seo, site, wcddl

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




Powered by vBulletin


Content Relevant URLs by vBSEO