1.8.x Tính Năng: Google SEO

Preview

Tác giả: frostschutz

Phiên bản: 1.8.4

Gửi lúc: 20/09/2016

Cập nhật lúc: 09/08/2020

Mô tả
About

The development of this plugin started when Google released a document called"Google's Search Engine Optimization starter guide" in November 2008.After a long public beta phase the plugin finally reached stable status inMarch 2009. A new, revised edition for MyBB 1.6.4 and newer was releasedin August 2011.

The goal of this plugin is to implement Search Engine Optimization (SEO)in MyBB according to the guidelines presented in Google's SEO starter guide to make MyBB more friendly to both users and search engines.

Google SEO is free open source software (LGPL). This means that you candownload the plugin for free, modify it to your liking, and you do not haveto put any copyright or backlinks on your page.

[/url][url=#contents]Features


The plugin currently supports the following features. All features can beselectively disabled / enabled. For more detailed information, refer tothe Configuration section below.
  • Google SEO 404:
    • Error pages return HTTP 404 Not Found (and others) instead of 200 OK
    • Custom 404 error pages
    • Google's 404 widget
  • Google SEO Meta:
    • description meta tags for forums / threads / etc.
    • specify canonical pages
    • nofollow links
  • Google SEO Redirect:
    • redirect old URLs to new URLs (or vice versa)
    • avoid URL breakage and double content
  • Google SEO Sitemap:
    • dynamic generation of XML Sitemaps
    • search engines find your content without crawling
  • Google SEO URL:
    • Keyword URLs (e.g. Thread-Some-Subject instead of showthread.php?tid=12345)
    • UTF-8 in URLs is supported
    • Customizable URL styles
[/url][url=#contents]Installing


In order to install this plugin, first check that you meet therequirements, then upload the plugin's files (usually the entireinc/ folder). The list of requirements and files with additionalinstructions is listed below. Once all files are present, you canuse the Install/Activate controls in the Admin CP and configure it.Once installed, the plugin will show a status which may containfurther instructions.

[/url][url=#contents]Requirements


In order to use this plugin, you must meet these requirements:
  • MyBB 1.6.4 (older versions of MyBB need the Google SEO Legacy plugin)
  • PluginLibrary 11
  • PHP 5.1.0
  • Apache (alternative webservers may work but are not supported)
  • MySQL (alternative databases are not supported at this time)

Some features of this plugin also require changes to core files.The changes can be applied and reverted in the Admin CP.

[/url][url=#contents]Upload language files


This plugin uses the following language files. Please upload them all.
  • inc/languages/english/admin/googleseo_plugin.lang.php
  • inc/languages/english/admin/googleseo_settings.lang.php
  • inc/languages/english/googleseo.lang.php

Note

If your board uses languages other than English, please uploadanother copy of the language files for each language, i.e.into every inc/languages/*/ folder.

[/url][url=#contents]Language Packs


Language Packs for this plugin may be available on the MyBB Mods site,but there is no guarantee they will be up to date. This plugin has veryfew (less than ten) language strings that will be used outside ofthe Admin CP. You will find them in googleseo.lang.php. You can eithertranslate them yourself or leave them as is.

[/url][url=#contents]Upload plugin files


This plugin uses the following plugin files. Please upload them all.
  • inc/plugins/google_seo.html (the documentation you are reading)
  • inc/plugins/google_seo.php
  • inc/plugins/google_seo/404.php
  • inc/plugins/google_seo/meta.php
  • inc/plugins/google_seo/plugin.php
  • inc/plugins/google_seo/redirect.php
  • inc/plugins/google_seo/sitemap.php
  • inc/plugins/google_seo/url.php
[/url][url=#contents]Enable the plugin


Once all files are uploaded to the correct location, go to yourAdmin CP -> Plugins page. The Google SEO Plugin should show up inthe plugin list. Click Install & Activate to install the plugin.The plugin will show a status information with further instructionsfor you to follow. By default, all features of the plugins will bedisabled at first and can be enabled on the Admin CP -> Configuration page.

[/url][url=#contents]Updating


The Google SEO plugin can be updated by uploading the new files(as described in the Installing section above). Once all the new filesare in place, go to your Admin CP -> Plugins page and deactivatethe plugin, then activate it again. Further instructions may begiven in the plugin status. New settings might be availablein the Admin CP -> Configuration page.


Note

If you are updating from Google SEO Legacy or Google SEO 1.1.13 or older,you have to undo any modifications made to inc/functions.php prior toupdating the plugin. Please obtain the original, unmodified inc/functions.phpdirectly from the MyBB downloads page or MyBB Wiki.

If you were using the Patches plugin to modify inc/functions.php,please deactivate / remove the Google SEO related Patches.

[/url][url=#contents]Uninstalling


If you want to redirect SEO URLs back to MyBB stock URLs,do not uninstall but refer to the Redirection section below.

To uninstall the plugin, go to your Admin CP -> Plugins page andclick Uninstall. Then remove the plugin's files (listed in the Installingsection above). Also remove all other modifications you may have madeto additional files such as htaccess.


Note

Uninstalling Google SEO removes its URL database. If you wereusing SEO URLs, those URLs will no longer work and old URLswon't be redirected even if you reinstall the plugin.

[/url][url=#contents]Plugin Status


When installed and activated, Google SEO will display a plugin statuson the Admin CP -> Plugins page. The status gives an overview of whichof the plugin's features are enabled or disabled. It will also warn youabout known issues and tell you when you have to make changes, suchas adding Rewrite Rules or applying or reverting changes to core files.


Note

Check the plugin status regularly (especially when changing settings)to see if everything is the way you want it to be.

[/url][url=#contents]Configuration & Settings


Google SEO has lots of settings, organized into several settinggroups. If you go to your Admin CP -> Configuration page, andscroll down, you should see the Google SEO Setting groups.The following sections will describe the settings available ineach group. Please also read the descriptions of the settingsthemselves directly in the Admin CP.

[/url][url=#contents]Google SEO


This is the main setting group of the plugin. In here you can decidewhether or not to enable the various feature sections of the plugin.Disabling a setting here also disables all other settings of thatfeature, so for example if you disable URL, none of the settings inthe Google SEO URL setting group below will have any effect.

Settings in this group:
  • Enable Google SEO 404
  • Enable Google SEO Meta
  • Enable Google SEO Redirect
  • Enable Google SEO Sitemap
  • Enable Google SEO URL
Note

Many of the settings below are intended for advanced users only.If you do not understand what a setting does, stick to therecommended default value.

[/url][url=#contents]Google SEO 404

Settings in this group:
  • 404 widget
  • Show 404 errors in Who's Online
  • Customize HTTP status codes
  • Debug 404 error labels
[/url][url=#contents]Google SEO Meta

Settings in this group:
  • Meta description
  • Canonical Page
  • Meta for Archive Mode
  • Provide page number for forum and thread titles
  • Nofollow links
  • Noindex forums
[/url][url=#contents]Page number in forum and thread titles


By default, MyBB does not include a page number in the title.This causes Google to complain about lots of duplicate titletags for forums and threads which have many pages.

Google SEO Meta provides a variable which you can includeinto your forumdisplay and showthread templates. Howeverif you want this, you have to edit these templates manually.

Example <title> tag in the showthread template:
Code: 
<title>{$thread['subject']}{$google_seo_page}</title>

The variable will only be set for pages > 1, so this changewould lead to page titles like "Subject" for page 1 and"Subject - Page 2" for page 2.

[/url][url=#contents]Google SEO Redirect


Settings in this group:
  • Permission Checks
  • Redirect Post Links
  • LiteSpeed Bug workaround
  • Nginx Bug workaround
  • Debug Redirect
[/url][url=#contents]Redirect Loops


If you experience redirect loops (redirects that never end)please enable the Debug Redirect feature and send me thedebug output. Please note that the debug output may containconfidential information (such as login cookies), so pleasedon't post it in public, but email / PM me directly.

If you are using an alternative webserver, you can alsogive the LiteSpeed / Nginx workaround settings a try (evenif you're not using those webservers) and see if they help.

Otherwise, disable Redirect until a solution can be found.


[/url][url=#contents]Redirecting SEO URLs back to MyBB stock URLs


Google SEO does not force you to keep using its URLs. If youwant to go back to stock URLs, you can do so. Basically youhave two options to achieve a SEO URL -> Stock URL redirection:
  • Empty the SEO URL scheme for a particular URL typeThis is useful if for example you want to go back to stockURLs for user profiles only, but not for forums and threads.Revert changes to core filesThis way the Google SEO URL module will be in inactive state.

Do not disable Google SEO URL or Redirect, and do not removethe Rewrite Rules from your .htaccess. All of these componentsare required to keep old keyword URLs and subsequent redirectworking.

[/url][url=#contents]Google SEO Sitemap


Settings in this group:
  • Sitemap URL scheme
  • Forums
  • Threads
  • Users
  • Announcements
  • Calendars
  • Events
  • Additional Pages
  • Sitemap Pagination
[/url][url=#contents]Sitemap Generation


The sitemap standard (or that what Google, Yahoo, Ask etc. are using)is described here:http://www.sitemaps.org/protocol.php

The sitemap-index.xml is an Sitemap index file as described there.It links to the actual sitemap files (sitemap-threads.xml?page=1).

Google SEO Sitemaps are created dynamically. When you tell Google aboutyour XML Sitemap (in Google Webmaster Tools, or by specifying it inyour robots.txt file) it will download the index, and then browse throughthe sitemaps listed in this index. So Google goes through your Sitemappage by page similar to how a user goes through your forums page by page.

It's split into pages because creating a sitemap for tens of thousands ofthreads, users and forums all at once would cause too much load.Also, sitemaps have a limitation of 50000 items per sitemap.

The Sitemap is created dynamically in order to give Google and othersearch engines the current up to date status of your forum whenever itchooses to access your sitemap. This way Google gets up to date sitemapsas early as possible which leads to google accessing your new content itfound via the sitemap as early as possible which leads to your new contentgetting indexed by Google as early as possible.

Please note that the Sitemap displays only forums and threads thatthe current user can actually read. So if you see private threads inyour sitemap, it may be because you're currently logged in as admin,and does not mean that Google will see those threads too.

[/url][url=#contents]Submit Sitemap to Search Engines


For the Sitemap to be of any use, you have to submit it to Search Engines.You can automate this process by adding a Sitemap directive to yourrobots.txt (example robots.txt included in the Google SEO package).By default your Sitemap will be called sitemap-index.xml.

[/url][url=#contents]Google SEO URL


Settings in this group:
  • Query Limit
  • Evaluation Mode
  • Use MyBB's Cache system for SEO URLs
  • Punctuation characters
  • URL separator
  • URL uniquifier
  • URL uniquifier enforcer
  • Character Translation
  • lowercase words
  • URL length soft limit
  • URL length hard limit
  • Handle Post Links
  • Handle multipage links
  • Forum URL scheme
  • Thread URL scheme
  • Thread Prefixes
  • Announcement URL scheme
  • User URL scheme
  • Calendar URL scheme
  • Event URL scheme
  • Include parent forum in forum URLs?
  • Include parent forum in thread URLs?
  • Include parent forum in announcement URLs?
  • Include parent calendar in event URLs?
[/url][url=#contents]Evaluation Mode

Google SEO URL has two possible modes of operation.

In Full Mode (Default), every time a SEO URL is requested, it willbe obtained and returned immediately. In worst case (if the URL isnot cached), this will require a database query. When querying URLsfrom the database, Google SEO tries to query as many URLs as possiblein one go, but it can't always predict which URLs will be requiredfor the rest of the page, especially when other plugins create linkstoo.

In Lazy Mode, Google SEO returns a place holder instead of theSEO URL. Just before the page is sent to the user, it will thenproceed to replace all placeholders with the SEO URL. This way,all URLs that are on the page can be handled in a single query.

The downside of Lazy Mode is that there's no guarantee thata requested URL will be used in the output. It might just aswell become part of some notification mail or used for otherpurposes. Since this is most likely to happen during POSTrequests, Lazy Mode will only work for GET requests andfall back to Full Mode for POST requests.

If you feel that Google SEO uses too many queries on your board,or if your board is just very large and active, or if yourdatabase just happens to be very slow, Lazy Mode mightbe for you. Otherwise stick to Full Mode as it is much morereliable.


[/url][url=#contents]Uniquifier


The Google SEO URL Uniquifier is applied to URLs that would otherwisenot be unique (and thus result in threads that are not accessible).Collision testing (for example for two threads with the same title)is done only once, therefore the uniquifier must result in a trulyunique URL that can not possibly collide with anything else.

A good uniquifier needs to fulfill these two criteria:
[*]contain the items unique {id}
[*]contain punctuation that cannot occur in non-uniquified URLs

Early versions of Google SEO used {url}-{id} as uniquifier andtherefore did not fulfill criteria 2. This could lead to collisionsin rare cases, for example:



Code: 
ID: 1, Title: Unique,URL: Thread-UniqueID: 2, Title: Unique 3, URL: Thread-Unique-3ID: 3, Title: Unique,URL: Thread-Unique-3 (same as Thread 2)


[*]

Thread 3 collides with Thread 1 (both are called Unique), so theuniquifier is applied. This results in Unique-3. However, therealready happens to be a thread called Unique-3. Doesn't work.

With the new uniquifier {url}{separator}{separator}{id},the uniquified URL will be Thread-Unique--3. Because the id isalready unique, and other URLs can't contain -- (title punctuationis reduced to one single separator, not two), that makes the URLas a whole unique.

If you use a custom uniquifier, make sure it fulfills the twocriteria listed above. Be aware that special punctuation characterslike :@/?& or space can break your URLs.
[/url]
[url=#contents]Character Translation


Please note that translation of characters is not required (browsersand Google handle them just fine), and it causes additional CPU cost.

You can do character translation in URLs if you so desire. In thetextbox of the character translation setting, specify one characterper line and its replacement, separated by =.

For example the following would replace German umlauts with theirmost commonly used ASCII counterparts:


Code: 
Ä = Ae
Ö = Oe
Ü = Ue
ä = ae
ö = oe
ü = ue
ß = ss


[*]


With this character translation setting, Thread-Übergrößenträgerwould appear as Thread-Uebergroessentraeger instead.


Note

Google SEO Legacy used a separate translate.php file instead.This file is not used anymore. The translations have to bespecified in the setting.

URL Schemes


Google SEO uses a simple, static URL scheme by default (Forum-Name,Thread-Name, etc.). This is recommended because it tells users and searchengines exactly what to expect behind an URL. It is possible to customizethe URL scheme with various settings. However, not every scheme willactually work. When customizing URL schemes, you have to be aware of thelimitations of both this plugin and MyBB.
[/url]
[url=#contents]Avoid Scheme Conflicts



Google SEO URL relies on the webserver to rewrite the URLs to the correctfile. Thread-Subject is rewritten to showthread.php, Forum-Name toforumdisplay.php, and so on. For those rewrites to work, every URL musthave something in it that identifies it as being of a particular type.

For this reason it's not possible to remove Thread- or Forum- becausethen the rewrite rules would confuse Subject for a forum URL and Namewith a thread URL. When you have a conflict of any kind in your URL scheme, the URLs will stop working and you will also lose the abilityto redirect these URLs later.


Note

If a Rewrite Rule matches more than one type of URL, you have a conflictand your URLs will stop working either altogether or at least partially.


The default scheme avoids conflicts by using prefixes: Thread-{url},Forum-{url}, Announcement-{url}, etc. This way a thread URL can neverstart with Forum- and a forum URL can never start with Thread-, sothere are no conflicts possible.

You can change those prefixes to something else as long as you keepsome kind of unique prefix, for example t-{url} instead of Thread-{url}.

You can also use postfixes, such as {url}-Thread and {url}-Forum.However you can not mix prefix and postfix, as otherwise Thread-Forumcould be either a thread called forum, or a forum called thread.

On the other hand, a postfix such as {url}.thread would work evenif the other URLs use prefixes, because by default the dot charactercan not occur in the {url} itself.
[/url]
[url=#dynamic-seo-urls]
Dynamic SEO URLs


If your webserver does not support mod_rewrite, you can put the keywordURL in the dynamic part. The default dynamic URL scheme would be like so:


Code: 
Forum:forumdisplay.php?{url}
Thread:showthread.php?{url}
Announcements: announcements.php?{url}
Users:member.php?action=profile&{url}
Calendars:calendar.php?{url}
Events:calendar.php?action=event&{url}





[*]

Please note that {url} must be a stand alone parameter. The following will NOT work:



Code: 
?Something-{url}?something={url}





[*]

The only exception to that rule are the parameter names that Google SEOuses internally for rewrites:



Code: 
forumdisplay.php?google_seo_forum={url}
showthread.php?google_seo_thread={url}
...





[*]
[/url][url=#contents]Virtual Directory Structure


Google SEO supports including the parent forum name in thread URL, and allows the use of the directory separator /. With this,in theory, you could build a virtual directory structure URL schemealong the lines of f-My-Category/f-My-Forum/t-Subject.

However, due to the issues involved with Virtual Directory Structure,this feature will never be directly supported in any way. You can do it if you absolutely want to but you will have to adapt your own rewrite rules for it (the standard rewrite rules do not look for / in {url}). The rewrite rules suggested in the Plugin Status won't work.

Doing this is NOT recommended for several reasons. First of all itmakes URLs more expensive and serves nothing but make your URLslonger than they need to be.

MyBB uses relative links everywhere. Introducing a directory structure,virtual or not, breaks those links. Some of these issues can be workedaround, but there's no guarantee that it will work with other thingssuch as JavaScript.

To work around this issue, add a base tag to your headerinclude template:



Code: 
<base href="{$settings['bburl']}/" />





[*]

Here's an example for a Virtual Directory Structure URL scheme:



Code: 
Forum:         f-{url}/
Thread:        f-{url}
Announcements: f-{url}
Users:         u-{url}/
Calendars:     c-{url}/
Events:        c-{url}
Parent Forum:  {parent}/f-{url}
Parent Thread: {parent}/t-{url}
Parent Announcement: {parent}/a-{url}
Parent Event:  {parent}/e-{url}





[*]

And the Rewrite Rules to go with it:



Code: 
# Google SEO URL Forums:
RewriteRule ^f\-([^./]+)/?$ forumdisplay.php?google_seo_forum=$1 [L,QSA,NC]
RewriteRule ^f\-([^.]+)/f-([^./]+)/?$ forumdisplay.php?google_seo_forum=$1/f-$2 [L,QSA,NC]
# Google SEO URL Threads:
RewriteRule ^f\-([^.]+)/t-([^./]+)$ showthread.php?google_seo_thread=$1/t-$2 [L,QSA,NC]
# Google SEO URL Announcements:
RewriteRule ^f\-([^.]+)/a-([^./]+)$ announcements.php?google_seo_announcement=$1/a-$2 [L,QSA,NC]
# Google SEO URL Users:
RewriteRule ^u\-([^./]+)/?$ member.php?action=profile&google_seo_user=$1 [L,QSA,NC]
# Google SEO URL Calendars:
RewriteRule ^c\-([^./]+)/?$ calendar.php?google_seo_calendar=$1 [L,QSA,NC]
# Google SEO URL Events:
RewriteRule ^c\-([^./]+)/e-([^./]+)$ calendar.php?action=event&google_seo_event=$1/e-$2 [L,QSA,NC]





[*]
[/url][url=#contents]Combined Styles


It is possible to combine the various URL scheme styles to some degree. You can take the standard URL style Thread-{url}, and put the {url}in the dynamic part instead using Thread?{url}. To make this work youneed a rewrite for Thread -> showthread.php.

With the {url} in the dynamic part of the URL, you can proceed toincluding parent forums in thread URLs, even using directory separators. Since / in the dynamic part of the URL is not seen as a real directory,you will avoid most of the pitfalls involved with the Virtual Directory Structure.

Here's an example for a combined URL scheme:



Code: 
Forum:         Forum?{url}
Thread:        Thread?{url}
Announcements: Announcement?{url}
Users:         User?{url}/
Calendars:     Calendar?{url}/
Events:        Event?{url}
Parent Forum:  {parent}/{url}
Parent Thread: {parent}/{url}
Parent Announcement: {parent}/{url}
Parent Event:  {parent}/{url}





[*]

The end result would be an URL like Thread?Category/Forum/Subject. Even so it's not recommended because the URL can just get too long.
[*]
Troubleshooting

SEO URLs do not work


If the SEO URLs do not appear (links are not changed), then you have eithernot enabled the URL settings properly, or you did not apply the necessarychanges to core files. Check your Plugin Status.

If the SEO URLs appear but give you errors like thread not found, threaddoes not exist, etc., then your Rewrite Rules do not work for some reason. Check that you have edited the .htaccess (not htaccess.txt!) correctly. Some hosts need a RewriteBase, others do not. If you are using a customSEO URL Scheme, make sure this scheme does not have any conflicts.
[*]
There is no sitemap.xml file


Google SEO's Sitemap is generated dynamically every time it is accessed.This means there is no file for it, similar to how there is no file fora specific thread. Instead of looking for a file on FTP, use HTTP.By default the URL to your sitemap will be yoursite/sitemap-index.xml
[*]
Users show up as seeing error pages in Who's Online


This usually happens when you have a missing image or CSS or JS filein your forum. The user visits a thread or forum, the browser tries to load the missing image, and the resulting 404 error overrides thelocation in the online list.

The Google SEO 404 Who's Online setting has an option to include theURI in the online status. If you enable this and then hover over theerror page links in Who's Online, you should be able to see whichpage / URL caused the error and fix it.
[*]
[/url][url=#contents]Support


If you need further assistance, the official release thread for this plugin can be found in the MyBB Community - Plugin Releases forum.
Về

Sự phát triển của plugin này bắt đầu khi Google phát hành một tài liệu có tên "Hướng dẫn dành cho người mới bắt đầu Tối ưu hóa Công cụ Tìm kiếm của Google" vào tháng 11 năm 2008.Sau một giai đoạn beta công khai dài, plugin cuối cùng đã đạt được trạng thái ổn định vào tháng 3 năm 2009. Một phiên bản mới, sửa đổi cho MyBB 1.6.4 và mới hơn đã được phát hành vào tháng 8 năm 2011.

Mục tiêu của plugin này là triển khai Tối ưu hóa Công cụ Tìm kiếm (SEO) trong MyBB theo các hướng dẫn được trình bày trong Hướng dẫn dành cho người mới bắt đầu SEO của Google để làm cho MyBB thân thiện hơn với cả người dùng và công cụ tìm kiếm.

Google SEO là phần mềm mã nguồn mở miễn phí (LGPL). Điều này có nghĩa là bạn có thểtải xuống plugin miễn phí, sửa đổi nó theo ý thích của bạn và bạn không phải đặt bất kỳ bản quyền hoặc liên kết ngược nào trên trang của mình.

[/url][url = #contents]Tính năng


Plugin hiện hỗ trợ các tính năng sau. Tất cả các tính năng có thể bị vô hiệu hóa / bật có chọn lọc. Để biết thêm thông tin chi tiết, hãy tham khảo phần Cấu hình bên dưới.
  • Google SEO 404:
    • Các trang lỗi trả về HTTP 404 Not Found (và các trang khác) thay vì 200 OK
    • Trang lỗi 404 tùy chỉnh
    • Tiện ích 404 của Google
  • Meta SEO của Google:
    • Mô tả thẻ meta cho diễn đàn / chủ đề / v.v.
    • Chỉ định trang chính tắc
    • liên kết nofollow
  • Chuyển hướng SEO của Google:
    • chuyển hướng URL cũ sang URL mới (hoặc ngược lại)
    • tránh phá vỡ URL và nội dung gấp đôi
  • Sơ đồ trang web SEO của Google:
    • tạo động Sơ đồ trang web XML
    • Công cụ tìm kiếm tìm thấy nội dung của bạn mà không cần thu thập dữ liệu
  • URL SEO của Google:
    • URL từ khóa (ví dụ: Thread-Some-Subject thay vì showthread.php?tid=12345)
    • UTF-8 trong URL được hỗ trợ
    • Kiểu URL có thể tùy chỉnh
[/url][url = #contents]Cài đặt


Để cài đặt plugin này, trước tiên hãy kiểm tra xem bạn có đáp ứng các yêu cầu hay không, sau đó tải lên các tệp của plugin (thường là thư mục toàn bộ). Danh sách các yêu cầu và tệp với hướng dẫn bổ sung được liệt kê dưới đây. Khi tất cả các tệp đã có mặt, bạn có thể sử dụng các điều khiển Cài đặt / Kích hoạt trong CP quản trị và định cấu hình nó. Sau khi cài đặt, plugin sẽ hiển thị trạng thái có thể chứa các hướng dẫn khác.

[/url][url = #contents]Yêu cầu


Để sử dụng plugin này, bạn phải đáp ứng các yêu cầu sau:
  • MyBB 1.6.4 (các phiên bản cũ hơn của MyBB cần Di sản SEO của Google plugin)
  • Thư viện PluginLibrary 11
  • PHP 5.1.0
  • Apache (máy chủ web thay thế có thể hoạt động nhưng không được hỗ trợ)
  • MySQL (cơ sở dữ liệu thay thế không được hỗ trợ tại thời điểm này)

Một số tính năng của plugin này cũng yêu cầu thay đổi các tệp cốt lõi. Các thay đổi có thể được áp dụng và hoàn nguyên trong CP quản trị.

[/url][url = #contents]Tải lên tệp ngôn ngữ


Plugin này sử dụng các tệp ngôn ngữ sau. Vui lòng tải lên tất cả.
  • inc/languages/tiếng anh/admin/googleseo_plugin.lang.php
  • inc/languages/english/admin/googleseo_settings.lang.php
  • inc/languages/tiếng anh/googleseo.lang.php

Ghi

Nếu bảng của bạn sử dụng các ngôn ngữ khác ngoài tiếng Anh, vui lòng tải lên một bản sao khác của các tệp ngôn ngữ cho từng ngôn ngữ, tức là vào mọi thư mục inc/languages/*/.

[/url][url = #contents]Gói ngôn ngữ


Gói ngôn ngữ cho plugin này có thể có sẵn trên trang web MyBB Mods, nhưng không có gì đảm bảo chúng sẽ được cập nhật. Plugin này có rất ít (dưới mười) chuỗi ngôn ngữ sẽ được sử dụng bên ngoài Admin CP. Bạn sẽ tìm thấy chúng ở googleseo.lang.php. Bạn có thể tự dịch chúng hoặc để nguyên chúng.

[/url][url = #contents]Tải lên các tệp plugin


Plugin này sử dụng các tệp plugin sau. Vui lòng tải lên tất cả.
  • inc/plugins/google_seo.html (tài liệu bạn đang đọc)
  • inc/plugins/google_seo.php
  • inc/plugins/google_seo/404.php
  • inc/plugins/google_seo/meta.php
  • inc/plugins/google_seo/plugin.php
  • inc/plugins/google_seo/redirect.php
  • inc/plugins/google_seo/sitemap.php
  • inc/plugins/google_seo/url.php
[/url][url = #contents]Bật plugin


Khi tất cả các tệp được tải lên đúng vị trí, hãy chuyển đếnAdmin CP -> Plugin trang. Plugin SEO của Google sẽ hiển thị trong danh sách plugin. Bấm Cài đặt và kích hoạt để cài đặt plugin. Plugin sẽ hiển thị thông tin trạng thái với các hướng dẫn khác để bạn làm theo. Theo mặc định, tất cả các tính năng của plugin sẽ bị vô hiệu hóa lúc đầu và có thể được bật trên Cấu hình CP -> của quản trị viên trang.

[/url][url = #contents]Cập nhật


Plugin Google SEO có thể được cập nhật bằng cách tải lên các tệp mới (như được mô tả trong phần Cài đặt ở trên). Khi tất cả các tệp mới đã được đặt tại chỗ, hãy truy cập trang Admin CP -> Plugins của bạn và hủy kích hoạt plugin, sau đó kích hoạt lại. Các hướng dẫn khác có thể được đưa ra trong trạng thái plugin. Các cài đặt mới có thể có sẵn trong trang Cấu hình CP -> của quản trị.


Ghi

Nếu bạn đang cập nhật từ Google SEO Legacy hoặc Google SEO 1.1.13 trở lên, bạn phải hoàn tác bất kỳ sửa đổi nào được thực hiện đối với inc / functions.php trước khi cập nhật plugin. Vui lòng lấy inc/functions.php gốc, chưa sửa đổitrực tiếp từ Trang tải xuống MyBB hoặc MyBB Wiki.

Nếu bạn đang sử dụng plugin Bản vá để sửa đổi inc / functions.php, vui lòng hủy kích hoạt / xóa các Bản vá liên quan đến Google SEO.

[/url][url = #contents]Gỡ cài đặt


Nếu bạn muốn chuyển hướng URL SEO trở lại URL chứng khoán MyBB, đừng gỡ cài đặt mà hãy tham khảo phần Chuyển hướng bên dưới.

Để gỡ cài đặt plugin, hãy truy cập vào Admin CP -> Plugin trang và nhấp vào Gỡ cài đặt. Sau đó xóa các tệp của plugin (được liệt kê trong phần Cài đặt ở trên). Đồng thời xóa tất cả các sửa đổi khác mà bạn có thể đã thực hiện đối với các tệp bổ sung như htaccess.


Ghi

Gỡ cài đặt Google SEO sẽ xóa cơ sở dữ liệu URL của nó. Nếu bạn đang sử dụng URL SEO, những URL đó sẽ không còn hoạt động và các URL cũ sẽ không được chuyển hướng ngay cả khi bạn cài đặt lại plugin.

[/url][url = #contents]Trạng thái plugin


Khi được cài đặt và kích hoạt, Google SEO sẽ hiển thị trạng thái plugin trên Admin CP -> Plugin trang. Trạng thái cung cấp tổng quan về tính năng nào của plugin được bật hoặc tắt. Nó cũng sẽ cảnh báo bạn về các vấn đề đã biết và cho bạn biết khi nào bạn phải thực hiện các thay đổi, chẳng hạn như thêm Quy tắc viết lại hoặc áp dụng hoặc hoàn nguyên các thay đổi đối với các tệp cốt lõi.


Ghi

Kiểm tra trạng thái plugin thường xuyên (đặc biệt là khi thay đổi cài đặt) để xem mọi thứ có theo cách bạn muốn hay không.

[/url][url = #contents]Cấu hình & Cài đặt


Google SEO có rất nhiều cài đặt, được tổ chức thành nhiều nhóm cài đặt. Nếu bạn truy cập vào Cấu hình CP -> của quản trị viên và cuộn xuống, bạn sẽ thấy các nhóm Cài đặt SEO của Google. Các phần sau đây sẽ mô tả các cài đặt có sẵn trong mỗi nhóm. Vui lòng đọc mô tả về các cài đặt trực tiếp trong CP quản trị.

[/url][url = #contents]Google SEO


Đây là nhóm cài đặt chính của plugin. Tại đây, bạn có thể quyết định có bật các phần tính năng khác nhau của plugin hay không. Tắt cài đặt ở đây cũng vô hiệu hóa tất cả các cài đặt khác của tính năng đó, vì vậy ví dụ: nếu bạn tắt URL, không có cài đặt nào trong nhóm cài đặt URL SEO của Google bên dưới sẽ có bất kỳ tác dụng nào.

Cài đặt trong nhóm này:
  • Bật Google SEO 404
  • Bật Google SEO Meta
  • Bật chuyển hướng SEO của Google
  • Bật sơ đồ trang web SEO của Google
  • Bật URL SEO của Google
Ghi

Nhiều cài đặt dưới đây chỉ dành cho người dùng nâng cao. Nếu bạn không hiểu cài đặt làm gì, hãy bám sát giá trị mặc định được đề xuất.

[/url][url = #contents]Google SEO 404

Cài đặt trong nhóm này:
  • Tiện ích 404
  • Hiển thị lỗi 404 trong Who's Online
  • Tùy chỉnh mã trạng thái HTTP
  • Gỡ lỗi nhãn lỗi 404
[/url][url = #contents]Google SEO Meta

Cài đặt trong nhóm này:
  • Mô tả meta
  • Trang chính tắc
  • Meta cho Chế độ lưu trữ
  • Cung cấp số trang cho tiêu đề diễn đàn và chủ đề
  • Liên kết Nofollow
  • Diễn đàn Noindex
[/url][url = #contents]Số trang trong tiêu đề diễn đàn và chủ đề


Theo mặc định, MyBB không bao gồm số trang trong tiêu đề. Điều này khiến Google phàn nàn về nhiều thẻ tiêu đề trùng lặp cho các diễn đàn và chủ đề có nhiều trang.

Google SEO Meta cung cấp một biến mà bạn có thể đưa vào Diễn đànhiển thịchủ đề hiển thị Mẫu. Tuy nhiên, nếu bạn muốn điều này, bạn phải chỉnh sửa các mẫu này theo cách thủ công.

Ví dụ <title> trong thẻ chủ đề hiển thị Mẫu:
<title>{$thread['chủ đề']}{$google_seo_page}</title>

Biến sẽ chỉ được đặt cho các trang > 1, vì vậy thay đổi này sẽ dẫn đến các tiêu đề trang như "Chủ đề" cho trang 1 và "Chủ đề - Trang 2" cho trang 2.

[/url][url = #contents]Chuyển hướng SEO của Google


Cài đặt trong nhóm này:
  • Kiểm tra quyền
  • Chuyển hướng liên kết bài đăng
  • Giải pháp khắc phục lỗi LiteSpeed
  • Giải pháp khắc phục lỗi Nginx
  • Gỡ lỗi chuyển hướng
[/url][url = #contents]Vòng lặp chuyển hướng


Nếu bạn gặp phải các vòng lặp chuyển hướng (chuyển hướng không bao giờ kết thúc), vui lòng bật Gỡ lỗi chuyển hướng tính năng và gửi cho tôi đầu ra gỡ lỗi. Xin lưu ý rằng đầu ra gỡ lỗi có thể chứa thông tin bí mật (chẳng hạn như cookie đăng nhập), vì vậy vui lòng không đăng nó ở nơi công cộng, mà hãy gửi email / PM trực tiếp cho tôi.

Nếu bạn đang sử dụng một máy chủ web thay thế, bạn cũng có thể thử cài đặt giải pháp LiteSpeed / Nginx (ngay cả khi bạn không sử dụng các máy chủ web đó) và xem chúng có hữu ích hay không.

Nếu không, hãy tắt Chuyển hướng cho đến khi có thể tìm thấy giải pháp.


[/url][url = #contents]Chuyển hướng URL SEO trở lại URL cổ phiếu MyBB


Google SEO không buộc bạn phải tiếp tục sử dụng URL của nó. Nếu bạn muốn quay lại URL có sẵn, bạn có thể làm như vậy. Về cơ bản, bạn có hai tùy chọn để đạt được URL SEO -> chuyển hướng URL chứng khoán:
  • Làm trống lược đồ URL SEO cho một loại URL cụ thểĐiều này hữu ích nếu bạn muốn quay lại stockURL chỉ cho hồ sơ người dùng, nhưng không phải cho diễn đàn và chủ đề. Hoàn nguyên các thay đổi đối với tệp cốt lõiBằng cách này, mô-đun URL SEO của Google sẽ ở trạng thái không hoạt động.

Không tắt URL SEO của Google hoặc Chuyển hướng và không xóa Quy tắc viết lại khỏi .htaccess của bạn. Tất cả các thành phần này đều được yêu cầu để giữ các URL từ khóa cũ và chuyển hướng tiếp theo.

[/url][url = #contents]Sơ đồ trang web SEO của Google


Cài đặt trong nhóm này:
  • Sơ đồ URL sơ đồ trang web
  • Diễn đàn
  • Chủ đề
  • Người dùng
  • Thông báo
  • Lịch
  • Sự kiện
  • Các trang bổ sung
  • Sơ đồ trang web Phân trang
[/url][url = #contents]Tạo sơ đồ trang web


Tiêu chuẩn sơ đồ trang web (hoặc những gì Google, Yahoo, Ask, v.v. đang sử dụng) được mô tả ở đây:http://www.sitemaps.org/protocol.php

sitemap-index.xml là một tệp chỉ mục Sơ đồ trang web như được mô tả ở đó. Nó liên kết đến các tệp sơ đồ trang web thực tế (sitemap-threads.xml?page=1).

Sơ đồ trang web SEO của Google được tạo động. Khi bạn cho Google biết về Sơ đồ trang web XML của mình (trong Công cụ quản trị trang web của Google hoặc bằng cách chỉ định nó trong tệp robots.txt của bạn), nó sẽ tải xuống chỉ mục, sau đó duyệt qua các sơ đồ trang web được liệt kê trong chỉ mục này. Vì vậy, Google xem qua Sơ đồ trang web của bạn theo từng trang tương tự như cách người dùng xem qua các diễn đàn của bạn từng trang.

Nó được chia thành các trang vì việc tạo sơ đồ trang web cho hàng chục nghìn chủ đề, người dùng và diễn đàn cùng một lúc sẽ gây ra quá nhiều tải. Ngoài ra, sơ đồ trang web có giới hạn 50000 mục cho mỗi sơ đồ trang web.

Sơ đồ trang web được tạo động để cung cấp cho Google và các công cụ tìm kiếm khác trạng thái cập nhật hiện tại của diễn đàn của bạn bất cứ khi nào nó chọn truy cập sơ đồ trang web của bạn. Bằng cách này, Google cập nhật sơ đồ trang web càng sớm càng tốt, dẫn đến việc google truy cập nội dung mới của bạn mà nó được tìm thấy thông qua sơ đồ trang web càng sớm càng tốt, dẫn đến nội dung mới của bạn được Google lập chỉ mục càng sớm càng tốt.

Xin lưu ý rằng Sơ đồ trang web chỉ hiển thị các diễn đàn và chủ đề mà người dùng hiện tại thực sự có thể đọc. Vì vậy, nếu bạn thấy các chủ đề riêng tư trong sơ đồ trang web của mình, đó có thể là do bạn hiện đang đăng nhập với tư cách quản trị viên và không có nghĩa là Google cũng sẽ thấy các chuỗi đó.

[/url][url = #contents]Gửi sơ đồ trang web cho công cụ tìm kiếm


Để Sơ đồ trang web có thể được sử dụng, bạn phải gửi nó đến Công cụ tìm kiếm.Bạn có thể tự động hóa quá trình này bằng cách thêm chỉ thị Sơ đồ trang web vào yourrobots.txt (ví dụ robots.txt có trong gói SEO của Google). Theo mặc định, Sơ đồ trang web của bạn sẽ được gọi là sitemap-index.xml.

[/url][url = #contents]Google SEO URL


Cài đặt trong nhóm này:
  • Giới hạn truy vấn
  • Chế độ đánh giá
  • Sử dụng hệ thống Cache của MyBB cho URL SEO
  • Ký tự dấu câu
  • Dấu phân tách URL
  • URL uniquifier
  • URL uniquifier thực thi
  • Dịch nhân vật
  • Từ viết thường
  • Giới hạn mềm độ dài URL
  • Giới hạn cứng độ dài URL
  • Xử lý liên kết bài đăng
  • Xử lý liên kết nhiều trang
  • Lược đồ URL diễn đàn
  • Lược đồ URL luồng
  • Tiền tố chủ đề
  • Lược đồ URL thông báo
  • Lược đồ URL người dùng
  • Lược đồ URL lịch
  • Lược đồ URL sự kiện
  • Bao gồm diễn đàn mẹ trong URL diễn đàn?
  • Bao gồm diễn đàn mẹ trong URL chủ đề?
  • Bao gồm diễn đàn phụ huynh trong URL thông báo?
  • Bao gồm lịch mẹ trong URL sự kiện?
[/url][url = #contents]Chế độ đánh giá

URL SEO của Google có hai chế độ hoạt động có thể có.

Trong Chế độ đầy đủ (Mặc định), mỗi khi yêu cầu SEO URL, nó sẽ được lấy và trả về ngay lập tức. Trong trường hợp xấu nhất (nếu URL không được lưu vào bộ nhớ đệm), điều này sẽ yêu cầu truy vấn cơ sở dữ liệu. Khi truy vấn URL từ cơ sở dữ liệu, Google SEO cố gắng truy vấn càng nhiều URL càng tốt trong một lần, nhưng không phải lúc nào nó cũng có thể dự đoán URL nào sẽ được yêu cầu cho phần còn lại của trang, đặc biệt là khi các plugin khác cũng tạo liên kết.

Trong Chế độ lười, Google SEO trả về một trình giữ chỗ thay vì URL SEO. Ngay trước khi trang được gửi đến người dùng, sau đó nó sẽ tiến hành thay thế tất cả các trình giữ chỗ bằng URL SEO. Bằng cách này, tất cả các URL trên trang có thể được xử lý trong một truy vấn duy nhất.

Nhược điểm của Chế độ lười là không có gì đảm bảo rằng một URL được yêu cầu sẽ được sử dụng trong đầu ra. Nó cũng có thể trở thành một phần của một số thư thông báo hoặc được sử dụng cho các mục đích khác. Vì điều này có nhiều khả năng xảy ra trong các yêu cầu POST, Chế độ lười sẽ chỉ hoạt động với các yêu cầu GET và quay trở lại Chế độ đầy đủ cho các yêu cầu POST.

Nếu bạn cảm thấy rằng Google SEO sử dụng quá nhiều truy vấn trên bảng của bạn, hoặc nếu bảng của bạn chỉ rất lớn và hoạt động, hoặc nếu cơ sở dữ liệu của bạn tình cờ rất chậm, Chế độ lười có thể dành cho bạn. Nếu không, hãy gắn bó với Chế độ đầy đủ vì nó đáng tin cậy hơn nhiều.


[/url][url = #contents]Đơn vị


Google SEO URL Uniquifier được áp dụng cho các URL không phải là duy nhất (và do đó dẫn đến các chuỗi không thể truy cập được). Kiểm tra va chạm (ví dụ: đối với hai luồng có cùng tiêu đề) chỉ được thực hiện một lần, do đó uniquifier phải tạo ra một URL thực sự duy nhất không thể va chạm với bất kỳ thứ gì khác.

Một uniquifier tốt cần phải đáp ứng hai tiêu chí sau:
[*]chứa các mục duy nhất {id}
[*]chứa dấu câu không thể xuất hiện trong các URL không được xác định

Các phiên bản đầu tiên của Google SEO sử dụng {url}-{id} làm uniquifier và do đó không đáp ứng tiêu chí 2. Điều này có thể dẫn đến va chạm trong một số trường hợp hiếm hoi, ví dụ:



ID: 1, Tiêu đề: Duy nhất,URL: Thread-UniqueID: 2, Tiêu đề: Duy nhất 3, URL: Thread-Unique-3ID: 3, Tiêu đề: Duy nhất,URL: Thread-Unique-3 (giống như Thread 2)


[*]

Thread 3 va chạm với Thread 1 (cả hai đều được gọi là Unique), vì vậy uniquifier được áp dụng. Điều này dẫn đến Duy nhất-3. Tuy nhiên, đã có một luồng được gọi là Unique-3. Không hoạt động.

Với uniquifier mới {url}{separator}{separator}{id}, URL uniquated sẽ là Thread-Unique--3. Bởi vì id đã là duy nhất và các URL khác không thể chứa -- (dấu câu tiêu đề được giảm xuống còn một dấu phân cách duy nhất, không phải hai), điều đó làm cho toàn bộ URL trở nên duy nhất.

Nếu bạn sử dụng một uniquifier tùy chỉnh, hãy đảm bảo rằng nó đáp ứng hai tiêu chí được liệt kê ở trên. Lưu ý rằng các ký tự dấu câu đặc biệt như :@/?& hoặc dấu cách có thể phá vỡ URL của bạn.
[/url]
[url = #contents]Dịch nhân vật

Xin lưu ý rằng dịch các ký tự là không bắt buộc (trình duyệt và Google xử lý chúng tốt) và nó gây thêm chi phí CPU.

Bạn có thể dịch ký tự trong URL nếu bạn muốn. Trong hộp văn bản của cài đặt dịch ký tự, chỉ định một dòng ký tự và thay thế nó, được phân tách bằng =.

Ví dụ: sau đây sẽ thay thế umlaut của Đức bằng các đối tác ASCII được sử dụng phổ biến nhất của chúng:


Ä = Ae
Ö = Oe
Ü = Ue
ä = ae
ö = oe
ü = ue
ß = ss


[*]


Với cài đặt dịch ký tự này, Thread-Übergrößenträger sẽ xuất hiện dưới dạng Thread-Uebergroessentraeger thay thế.


Ghi

Thay vào đó, Google SEO Legacy đã sử dụng một tệp translate.php riêng biệt. Tệp này không được sử dụng nữa. Các bản dịch phải được chỉ định trong cài đặt.

Lược đồ URL


Google SEO sử dụng lược đồ URL tĩnh, đơn giản theo mặc định (Tên diễn đàn, Tên chủ đề, v.v.). Điều này được khuyến khích vì nó cho người dùng và công cụ tìm kiếm biết chính xác những gì mong đợi đằng sau một URL. Có thể tùy chỉnh lược đồ URL với nhiều cài đặt khác nhau. Tuy nhiên, không phải mọi kế hoạch đều thực sự hiệu quả. Khi tùy chỉnh lược đồ URL, bạn phải nhận thức được những hạn chế của cả plugin này và MyBB.
[/url]
[url = #contents]Tránh xung đột kế hoạch


URL SEO của Google dựa vào máy chủ web để viết lại các URL thành tệp chính xác. Chủ đề-Chủ đề được viết lại thành showthread.php, Tên diễn đàn toforumdisplay.php, v.v. Để những lần viết lại hoạt động, mỗi URL phải có một cái gì đó trong đó xác định nó là một loại cụ thể.

Vì lý do này, không thể xóa Chủ đề hoặc Diễn đàn - bởi vì sau đó các quy tắc viết lại sẽ nhầm lẫn Chủ đề với URL diễn đàn và Tên với URL chủ đề. Khi bạn có bất kỳ loại xung đột nào trong lược đồ URL của mình, các URL sẽ ngừng hoạt động và bạn cũng sẽ mất khả năng chuyển hướng các URL này sau này.


Ghi

Nếu Quy tắc viết lại khớp với nhiều loại URL, bạn sẽ có xung đột và URL của bạn sẽ ngừng hoạt động hoàn toàn hoặc ít nhất là một phần.


Lược đồ mặc định tránh xung đột bằng cách sử dụng tiền tố: Thread-{url}, Forum-{url}, Announcement-{url}, v.v. Bằng cách này, URL luồng không bao giờ có thể bắt đầu bằng Diễn đàn- và URL diễn đàn không bao giờ có thể bắt đầu bằng Thread-, vì vậy không có xung đột nào có thể xảy ra.

Bạn có thể thay đổi các tiền tố đó thành một cái gì đó khác miễn là bạn giữ một số loại tiền tố duy nhất, ví dụ như t-{url} thay vì Thread-{url}.

Bạn cũng có thể sử dụng các hậu tố, chẳng hạn như {url}-Thread và {url}-Forum.Tuy nhiên, bạn không thể kết hợp tiền tố và hậu tố, vì nếu không Thread-Forum có thể là một chủ đề được gọi là diễn đàn hoặc một diễn đàn được gọi là chủ đề.

Mặt khác, một hậu tố như {url}.thread sẽ hoạt động ngay cả khi các URL khác sử dụng tiền tố, bởi vì theo mặc định, ký tự dấu chấm không thể xuất hiện trong chính {url}.
[/url]
[url = #dynamic-seo-urls]URL SEO động


Nếu máy chủ web của bạn không hỗ trợ mod_rewrite, bạn có thể đặt từ khóa URL vào phần động. Lược đồ URL động mặc định sẽ như sau:


Forum:forumdisplay.php? {url}
Thread:showthread.php? {url}
Thông báo: announcements.php? {url}
Users:member.php?action=profile&{url}
Calendars:calendar.php? {url}
Events:calendar.php?action=event&{url}





[*]

Xin lưu ý rằng {url} phải là một tham số độc lập. Những điều sau đây sẽ KHÔNG hoạt động:



? Something-{url}?something={url}





[*]

Ngoại lệ duy nhất đối với quy tắc đó là tên tham số mà Google SEO sử dụng nội bộ để viết lại:



forumdisplay.php?google_seo_forum={url}
showthread.php?google_seo_thread={url}
...





[*]
[/url][url = #contents]Cấu trúc thư mục ảo


Google SEO hỗ trợ bao gồm tên diễn đàn mẹ trong URL luồng và cho phép sử dụng dấu phân cách thư mục /. Với điều này, về lý thuyết, bạn có thể xây dựng một lược đồ URL cấu trúc thư mục ảo theo dòng của f-My-Category/f-My-Forum/t-Subject.

Tuy nhiên, do các vấn đề liên quan đến Cấu trúc thư mục ảo, tính năng này sẽ không bao giờ được hỗ trợ trực tiếp theo bất kỳ cách nào. Bạn có thể làm điều đó nếu bạn thực sự muốn nhưng bạn sẽ phải điều chỉnh các quy tắc viết lại của riêng mình cho nó (các quy tắc viết lại tiêu chuẩn không tìm kiếm / trong {url}). Các quy tắc viết lại được đề xuất trong Trạng thái plugin sẽ không hoạt động.

Làm điều này KHÔNG được khuyến khích vì một số lý do. Trước hết, nó làm cho URL đắt hơn và không phục vụ gì ngoài việc làm cho URL của bạn dài hơn mức cần thiết.

MyBB sử dụng các liên kết tương đối ở khắp mọi nơi. Giới thiệu cấu trúc thư mục, ảo hay không, sẽ phá vỡ các liên kết đó. Một số vấn đề này có thể được giải quyết, nhưng không có gì đảm bảo rằng nó sẽ hoạt động với những thứ khác, chẳng hạn như JavaScript.

Để khắc phục vấn đề này, hãy thêm thẻ cơ sở vào tiêu đềbao gồm Mẫu:



<base href="{$settings['bburl']}/" />





[*]

Dưới đây là một ví dụ cho lược đồ URL cấu trúc thư mục ảo:



Diễn đàn: f-{url}/
Chủ đề: f-{url}
Thông báo: f-{url}
Người dùng: u-{url}/
Lịch: c-{url}/
Sự kiện: c-{url}
Diễn đàn phụ huynh: {parent}/f-{url}
Chủ đề mẹ: {parent}/t-{url}
Thông báo dành cho phụ huynh: {parent}/a-{url}
Sự kiện mẹ: {parent}/e-{url}





[*]

Và Quy tắc viết lại đi kèm với nó:



# Diễn đàn URL SEO của Google:
RewriteRule ^f\-([^./]+)/?$ forumdisplay.php?google_seo_forum=$1 [L,QSA,NC]
RewriteRule ^f\-([^.]+)/f-([^./]+)/?$ forumdisplay.php?google_seo_forum=$1/f-$2 [L,QSA,NC]
# Chủ đề URL SEO của Google:
RewriteRule ^f\-([^.]+)/t-([^./]+)$ showthread.php?google_seo_thread=$1/t-$2 [L,QSA,NC]
# Thông báo URL SEO của Google:
RewriteRule ^f\-([^.]+)/a-([^./]+)$ announcements.php?google_seo_announcement=$1/a-$2 [L,QSA,NC]
# Người dùng URL SEO của Google:
RewriteRule ^u\-([^./]+)/?$ member.php?action=profile&google_seo_user=$1 [L,QSA,NC]
# Lịch URL SEO của Google:
RewriteRule ^c\-([^./]+)/?$ calendar.php?google_seo_calendar=$1 [L,QSA,NC]
# Sự kiện URL SEO của Google:
RewriteRule ^c\-([^./]+)/e-([^./]+)$ calendar.php?action=event&google_seo_event=$1/e-$2 [L,QSA,NC]





[*]
[/url][url = #contents]Phong cách kết hợp


Có thể kết hợp các kiểu lược đồ URL khác nhau ở một mức độ nào đó. Bạn có thể sử dụng kiểu URL tiêu chuẩn Thread-{url} và đặt {url} trong phần động thay vì sử dụng Thread? {url}. Để làm cho điều này hoạt động, bạn cần viết lại cho Thread -> showthread.php.

Với {url} trong phần động của URL, bạn có thể tiến hànhbao gồm các diễn đàn mẹ trong URL luồng, ngay cả khi sử dụng dấu phân cách thư mục. Vì / trong phần động của URL không được coi là một thư mục thực sự, bạn sẽ tránh được hầu hết các cạm bẫy liên quan đến Cấu trúc thư mục ảo.

Dưới đây là ví dụ về lược đồ URL kết hợp:



Diễn đàn: Diễn đàn? {url}
Chủ đề: Chủ đề? {url}
Thông báo: Thông báo? {url}
Người dùng: Người dùng? {url}/
Lịch: Lịch? {url}/
Sự kiện: Sự kiện? {url}
Diễn đàn dành cho phụ huynh: {parent}/{url}
Chủ đề mẹ: {parent}/{url}
Thông báo dành cho phụ huynh: {parent}/{url}
Sự kiện mẹ: {parent}/{url}





[*]

Kết quả cuối cùng sẽ là một URL như Thread? Thể loại/Diễn đàn/Chủ đề. Mặc dù vậy, nó không được khuyến khích vì URL có thể quá dài.
[*]
Troubleshooting

URL SEO không hoạt động


Nếu URL SEO không xuất hiện (liên kết không được thay đổi), thì bạn đã không bật cài đặt URL đúng cách hoặc bạn đã không áp dụng các thay đổi cần thiết cho các tệp cốt lõi. Kiểm tra Trạng thái plugin.

Nếu URL SEO xuất hiện nhưng cho bạn các lỗi như không tìm thấy luồng, luồng không tồn tại, v.v., thì Quy tắc viết lại không hoạt động vì một số lý do. Kiểm tra để đảm bảo rằng bạn đã chỉnh sửa Truy cập .htaccess (không phải htaccess.txt!) Chính xác. Một số máy chủ cần RewriteBase, những máy chủ khác thì không. Nếu bạn đang sử dụng Lược đồ URL customSEO, hãy đảm bảo rằng lược đồ này không có bất kỳ xung đột nào.
[*]
Không có tệp sitemap.xml


Sơ đồ trang web của Google SEO được tạo động mỗi khi nó được truy cập. Điều này có nghĩa là không có tệp cho nó, tương tự như cách không có tệp cho một luồng cụ thể. Thay vì tìm kiếm một tệp trên FTP, hãy sử dụng HTTP.By mặc định, URL đến sơ đồ trang web của bạn sẽ là trang web của bạn/sitemap-index.xml
[*]
Người dùng hiển thị là nhìn thấy các trang lỗi trong Who's Online


Điều này thường xảy ra khi bạn thiếu hình ảnh hoặc tệp CSS hoặc JS trong diễn đàn của mình. Người dùng truy cập một chủ đề hoặc diễn đàn, trình duyệt cố gắng tải hình ảnh bị thiếu và lỗi 404 ghi đè vị trí trong danh sách trực tuyến.

Cài đặt Google SEO 404 Who's Online có tùy chọn bao gồm URI trong trạng thái trực tuyến. Nếu bạn bật tính năng này và sau đó di chuột qua liên kết trang lỗi trong Who's Online, bạn sẽ có thể xem trang / URL nào gây ra lỗi và khắc phục nó.
[*]
[/url][url = #contents]Hỗ trợ


Nếu bạn cần hỗ trợ thêm, chủ đề phát hành chính thức cho plugin này có thể được tìm thấy trong diễn đàn Cộng đồng MyBB - Bản phát hành plugin.

Vietnamese Mybb Community

Diễn đàn MyBB Việt Nam là cộng đồng trực tuyến dành cho những người yêu thích và sử dụng hệ thống diễn đàn MyBB. Nơi này cung cấp không gian để chia sẻ kiến thức, kinh nghiệm và hỗ trợ về cài đặt, tối ưu hóa, và thiết kế giao diện. Với mục tiêu tạo ra một cộng đồng sôi nổi, MyBB Việt Nam là điểm đến lý tưởng cho cả người mới và chuyên gia để kết nối và học hỏi về MyBB.


Mã nguồn bởi MyBB, © 2002-2026 MyBB Group • © 2023-2026 Mybb.VN - Đây là dự án cộng đồng sử dụng MyBB, không thuộc về Nhóm MyBB chính thức.

This project was inspired by work from another MyBB developer, and the idea behind it belongs to that creator. The content shown here comes from MYBB.COM. MYBB.VN doesn’t claim ownership of any of it. If either the original developer or MYBB.COM ever prefers that something be removed, MYBB.VN will be happy to do so.


Hệ Thống

Thời gian hiện tại: 05-02-2026, 01:59 AM

USA - VN

hello@mybb.vn