1. Internal SEO optimization Dle 9.8

Internal SEO optimization Dle 9.8

  |   11
Internal SEO optimization Dle 9.8

Installation:
Open the file . htaccess , which is at the root of the site (this is where lies the main index.php)
and we find:

RewriteEngine On


Below we add ...
If the primary mirror is selected http://site.com :

### START Determine the primary mirror as site.com (site.com replace with your domain)
RewriteCond %{HTTP_HOST} ^www\.site\.com$ [NC]
RewriteRule ^(.*)$ http://site.com/$1 [R=301,L]
### END Determine the primary mirror


If the primary mirror is selected http://www.site.com :

### START Determine the primary mirror as www.site.com (www.site.com replace with your domain)
RewriteCond %{HTTP_HOST} ^site\.com$ [NC]
RewriteRule ^(.*)$ http://www.site.com/$1 [R=301,L]
### END Determine the primary mirror


Now, no matter how users will enter in the browser address of the site with www or not - will be redirected to the primary mirror site. As it is not important how are the external links to the site - the weight of all incoming links remain and added to the primary mirror.

2. Remove index.php from the address of the home page and category pages.

What kind of problems we solve:
- Duplication of the home page at the following addresses and http://site.com http://site.com/index.php.
- Duplication of category pages, tag or other sections by adding index.php to the end, for example, http://site.com/category/index.php, http://site.com/search/index.php, http://site.com/tag/index.php, etc.

Installation:
Open the file . htaccess , which is at the root of the site (this is where lies the main index.php)
and add to the end:

### Redirects with site.com/category/index.php on site.com/category/ etc.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} (.*)index\.php$
RewriteRule ^(.*)index\.php$ $1 [R=301,L]
### Redirect index.php on site
RewriteBase /
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/
RewriteRule ^index\.php$ / [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]


Now there will arise the most common doubles the home page, as well as duplicates of other categories and sections.

3. Merge URLs / page / 1 / with the main address for the home page and categories.

What kind of problems we solve:
- Duplication of the home page at the following addresses and http://site.com/page/1/ http://site.com/.
- Duplication of the primary (first) category page at the following addresses and http://site.com/category/page/1/ http://site.com/category/.

Installation:
Open the file . htaccess , which is at the root of the site (this is where lies the main index.php)
and find (see paragraph 1 patch)

### END Determine the primary mirror


Add the following:


### START redirect from the first page to the main
RewriteRule ^(.*)/page/1/$ $1/ [R=301,L]
RewriteRule ^(.*)page/1/$ $1/ [R=301,L]
### END redirect from the first page to the main


Open the file /engine/engine.php and we find:

if (($subaction == "showfull" or $subaction == "addcomment") and ((! isset ( $category ) or $category == ""))) {


Adding above:

if ( ($config['allow_alt_url'] == "yes") && (intval($_GET['cstart']) == 1) && (strpos($_SERVER['REQUEST_URI'], '/page/1') !== false) ) {
$first_page_url = str_replace ( "/page/1", "", $_SERVER['REQUEST_URI'] );
header("HTTP/1.0 301 Moved Permanently");
header("Location: $first_page_url");
die("Redirect");
}


Now, when you type a wrong address / page / 1 / in the end, will be redirect to the main page.

4. Redirect non-existent pages on the pagination correct and current.

What kind of problems we solve:
Take a very real situation - for some reason you decide to change the number of stories that appear on the home page or category pages. As happened to me: a site redesign, page structure has changed completely, it was decided to withdraw more brief news announcements on each page (it was 7, it was 10). The result was as follows - in the panel there are many webmasters pages with 404 errors. Simple arithmetic was on the news site 1000, on each page of output by 7 announcements, therefore, only in the main we get 1000/7 = 142 page pagination. After the change was exactly 100 pages. In the end, 42 pages just disappeared. And if we take another category, the non-existent pages are a hundred or two. This is bad, ugly, and do not rub.

Installation:
Open the file /engine/modules/show.short.php and at the bottom we find:

}
?>


Above add:

//Redirect to the last page if the page is specified in the url larger than the current maximum
$all_pages_count = @ceil( $count_all / $config['news_number'] );
if ($cstart > $all_pages_count) {
if ($all_pages_count > 1) {
header('HTTP/1.1 301 Moved Permanently');
header ('Location: ' . $url_page . '/page/' . $all_pages_count . '/');
die();
} else {
header('HTTP/1.1 301 Moved Permanently');
header ('Location: ' . $url_page . '/');
die();
}
}
//Redirect to the last page if the page is specified in the url is more than the maximum current



I will explain a little code: there is a check on the condition - if the current page number is greater than the maximum number of pages on the site (or category) there is a redirect to the last page. If the requested page number 2, pages and only one, then there is a redirect to gravnuyu page (or home page category).

An example of the fingers, someone requests a page of the site site.com/page/435 /, and on this site just 268 pages, therefore, to address the redirect happens site.com/page/268 /.

5. Redirect sections or categories, of which no longer exist on the main page.

What kind of problems we solve:
Again, real life example: You have decided to change the structure of the site or just deleted some categories as unnecessary, therefore, these pages will cease to exist, and references to them are somewhere to stay. For example, I once had blogs for users, available at site.com / blog /, and they went to the division of the people, that's it site.com/blog/user1 /, site.com/blog/user2 / and etc. For many years, as I carried out these blogs as unnecessary, and links to them, and errors in the panel webmaster live.

Installation:
Open the file /engine/engine.php and we find:


if (!$category_id) $category_id = 'not detected';


To this:

//Solve the categories that do not exist 
if ($config['allow_alt_url'] == "yes" AND ! $category_id AND $view_template != "rss") {
header("HTTP/1.0 301 Moved Permanently");
header("Location: {$config['http_home_url']}");
die("Redirect");
}
//Solve the categories that do not exist



Now all categories or directories that do not exist and do not have their id (check for the existence of talking on the id) will be redirected to the main page.

6. Redirect to remote or non-existent on the main news.

What kind of problems we solve:
Well, there's a standard situation and can occur at any site. You have removed some news and, of course, will be given 404 error. If you do not like it, that is what passes 404 error, it can be done, for example, 301-redirect to the home page, which certainly exists ;)

Installation:
Open the file /engine/modules/show.full.php and we find:

elseif( ! $news_found ) {
@header( "HTTP/1.0 404 Not Found" );
msgbox( $lang['all_err_1'], $lang['news_err_12'] );
}


To this:

// 301 redirect to the home, if the news is not found/no 
elseif( ! $news_found ) {
header("HTTP/1.0 301 Moved Permanently");
header("Location: {$config['http_home_url']}");
die("Redirect");
}
// 301 redirect to the home, if the news is not found/does not exist



Now when you go to a non-existent or far publication will be redirected to the main page.

7. Prohibit indexing sections of the site using meta-tag robots.

What kind of problems we solve:
Now, remember, I said that it is better to prohibit indexing of pages and sections using a meta tag, not using robots.txt. And now I'll tell you how you can implement this same conclusion in a meta engine DLE in certain sections of the site.

Installation:
Open the file /engine/engine.php, find and remove useless line:

<meta name="robots" content="all" />


If this line is not present, do not worry, just go ahead.

We further find:

if ($config['allow_rss']) $metatags .= <<<HTML;


Adding above:

if (
//$do == 'addnews' OR /* Page add news from the site */
//$do == 'alltags' OR /* Page for a list of tags */
//$do == 'feedback' OR /* Page feedback form */
//$do == 'favorites' OR /* Pages favorties Saves user */
//$do == 'lastcomments' OR /* Page for all the latest comments on the site, including comments individual user */
//$do == 'lastnews' OR /* Page View all the latest news */
//$do == 'lostpassword' OR /* Page password recovery */
//$do == 'pm' OR /* Pages private messaging users */
//$do == 'register' OR /* Page registering a new user */
//$do == 'rules' OR /* Page site's rules */
//$do == 'stats' OR /* Page site statistics */
//$do == 'search' OR /* search page and search results */
//$do == 'static' OR /* All static pages */
//$do == 'tags' OR /* View news by tag */
//$do == 'xfsearch' OR /* View additional news on the news. fields */
//$subaction == 'allnews' OR /* View all news user */
//$subaction == 'newposts' OR /* View unread news for the user */
//$subaction == 'showfull' OR /* View the full news */
//$subaction == 'userinfo' OR /* View profile */
//$dle_module == 'date' OR /* View the news archive for the year / month / day. Replaces once all three of the following line */
//($year != '' and $month == '' and $day == '') OR /* View the news archive for the year */
//($year != '' and $month != '' and $day == '') OR /* View the archive News this month */
//($year != '' and $month != '' and $day != '' and $subaction == '') OR /* View the archive of news per day */
//(intval($_GET['cstart']) > 1 ) OR /* Any page pagination */
//($dle_module == 'main' and (intval($_GET['cstart']) > 1)) OR /* Pages pagination for the main page */
//($do == 'cat' and $category != '' and $subaction == '' and (intval($_GET['cstart']) > 1)) OR /* Pages pagination for categories */
//($do == 'cat' and $category != '' and $subaction == '') OR /* View all categories */
//($do == 'cat' and $category_id == 'X' and $subaction == '') OR /* View a specific category. X replaced by the category id */
$catalog != '' /* Browse the directory by alphanumeric identifier */
) $metatags .= <<<HTML
\n<meta name="robots" content="noindex,nofollow" />
HTML;



* To use a specific rule should be removed ahead of the character / /
* The most important point - at the close of the index pages by this method, it is necessary to remove the robots.txt to block rules for pages and sections that we have closed with the meta-tag. Otherwise, would not make any sense.

At its discretion, you can from the above code, I have to remove some parts, sections that are specific to your site close to indexing is required. So, please be careful.

8. Correct robots.txt for DLE - what is it?

What kind of problems we solve:
Short essence of fasting - the smaller the better robots.txt file and better site, and this applies not only to the DLE, but generally to any engine or website.

Do you know what the ideal site? This site, each page of which is for the benefit of the visitor and this page is not ashamed to show search engine, because he liked it and will be highly ranked.

And what came up with robots.txt? To specify a search engine which pages to visit and can be indexed and which are not. Closing some pages from being indexed (or sections) you acknowledge that these pages are substandard or unnecessary for various reasons. Most often used to eliminate the ban takes pages and technical information. Unfortunately, the reality is that today, 99% of sites with Robots file is closed with the help of just those pages.

So once again - the perfect site - this is when there is no useless pages and close the inning. But CMS, no matter how cool they are, all the same pose for us, "surprise" and should get out. We come to the conclusion - without robots.txt not do.

Ideal robots.txt for DLE:

User-agent: *
Disallow: /engine/
Host: site.com
Sitemap: http://site.com/sitemap.xml
Dear visitor, you are browsing our website as Guest.
We strongly recommend you to register and login to view hidden contents.

Details

+6

Comments 11

newchap
newchap
V.I.P.
Commented By newchap on July 13, 2013 (3:11 pm)
Will there be a release for DLE 10 smile
1 61Forum topics : 6Forum replies : 34Forum likes : 0
spamhater
spamhater
DLE TEAM
Commented By spamhater on July 13, 2013 (4:20 pm)
took a quick look, it will work fine with 10.0 but will not work with 9.7 and older because will need a bit of a few lines to modify to fit URL but most part will work with 9.6 and newer
24 386Forum topics : 12Forum replies : 950Forum likes : 130

Love is a symbol of eternity. It wipes out all sense of time, destroying all memory of a beginning and all fear of an end!
Great achievement is usually born of great sacrifice, and is never the result of selfishness...Without continual growth and progress, such words as improvement, achievement, and success have no meaning.
newchap
newchap
V.I.P.
Commented By newchap on July 15, 2013 (9:26 am)
Quote: spamhater
took a quick look, it will work fine with 10.0 but will not work with 9.7 and older because will need a bit of a few lines to modify to fit URL but most part will work with 9.6 and newer


sounds good thanks for the heads up :)
1 61Forum topics : 6Forum replies : 34Forum likes : 0
netix
netix
Members
Commented By netix on July 28, 2013 (6:11 am)
How about for 9.7?
N/A 5Forum topics : 0Forum replies : 0Forum likes : 0
thuanngo
thuanngo
V.I.P.
Commented By thuanngo on July 28, 2013 (12:30 pm)
6. Redirect to remote or non-existent on the main news.
Can you redirect to search page with keywords = title ?
N/A 12Forum topics : 0Forum replies : 1Forum likes : 0

Free Download
AZShare.Co
spamhater
spamhater
DLE TEAM
Commented By spamhater on July 29, 2013 (7:48 am)
Quote: thuanngo
6. Redirect to remote or non-existent on the main news.
Can you redirect to search page with keywords = title ?

try this:
http://www.dlestarter.com/tutorials/hack/101-additional-details-in-error-page.html
Comment #21
24 386Forum topics : 12Forum replies : 950Forum likes : 130

Love is a symbol of eternity. It wipes out all sense of time, destroying all memory of a beginning and all fear of an end!
Great achievement is usually born of great sacrifice, and is never the result of selfishness...Without continual growth and progress, such words as improvement, achievement, and success have no meaning.
vplaydotmy
vplaydotmy
Members
Commented By vplaydotmy on August 15, 2013 (9:29 pm)
Hello, im running movies site.
My website title and page title is quite long. How do i change page title to custom one?
Example my website page title is ( Warm Bodies (2013) >> Watch High Definition Full Movie Online for free |Vplaytv) .

There website title at the end of my page title (Warm Bodies (2013))
I dont like it. Can help me to show how to change it to be like this

Watch Warm Bodies (2013) Online for free - Vplaytv

Thank you.
N/A 6Forum topics : 0Forum replies : 0Forum likes : 0
spamhater
spamhater
DLE TEAM
Commented By spamhater on August 16, 2013 (4:37 am)
you can customize your title using:
http://www.dlestarter.com/tutorials/hack/130-remove-the-extra-title.html
24 386Forum topics : 12Forum replies : 950Forum likes : 130

Love is a symbol of eternity. It wipes out all sense of time, destroying all memory of a beginning and all fear of an end!
Great achievement is usually born of great sacrifice, and is never the result of selfishness...Without continual growth and progress, such words as improvement, achievement, and success have no meaning.
vplaydotmy
vplaydotmy
Members
Commented By vplaydotmy on August 16, 2013 (8:33 pm)
Quote: spamhater
you can customize your title using:
http&#58;//www.dlestarter.com/tutorials/hack/130-remove-the-extra-title.html


Thank but i dont know how or where should i customize it. All i do are messing the code.
N/A 6Forum topics : 0Forum replies : 0Forum likes : 0
rkotafx
rkotafx
V.I.P.
Commented By rkotafx on September 29, 2013 (5:41 pm)
thnx applause a lot .........................
N/A 1Forum topics : 2Forum replies : 5Forum likes : 0
nabiladle
nabiladle
Members
Commented By nabiladle on November 7, 2013 (8:59 am)
hello
I created a streaming site and I added movies, but still the movies are not indexed even I created a sitemap to google webmaster
thank you for helping to solve my problem
N/A 2Forum topics : 0Forum replies : 0Forum likes : 0
Information!Would you like to leave your comment? Please Login to your account to leave comments. Don't have an account? You can create a free account now.
DLEStarter Notice!Please note...Every hack and every module will get additional queries from your database and some hacks and some modules may result your server overload, so install only what you "need", remove any hacks and modules from your script when you don't need them, all hacks and modules appears in this website are not guaranteed by DLEStarter Team for your script security and compatibility, please read instruction carefully and use hacks and modules at your own risk...Thank you.