首页 > 新闻 > WordPress 中文 Tag 链接问题解决方案

WordPress 中文 Tag 链接问题解决方案

WordPress 中文 Tag 链接无法正常访问的问题想必多数使用 Windows+IIS 主机的朋友都有遇到,以前出现这个问题增加一条伪静态规则就可以解决,见:wordpress win主机用404实现静态化,换了虚拟主机后不行了。找到一些可行的解决办法,摘录如下:

产生这个问题的主要原因是地址编码问题,及UTF-8和GBK之间转换的问题。IIS 对 URL 截取的时候取得的是 GBK 编码,但是 WordPress 中文都用的 UTF-8 编码,所以我们要对编码进行处理后再交给数据库进行查询。

一、转换编码解决 WordPress 中文 Tag 链接问题(推荐)

打开文件:wp-includes\classes.php

查找:

$pathinfo = $_SERVER['PATH_INFO'];

修改为:

$pathinfo = mb_convert_encoding($_SERVER['PATH_INFO'], "UTF-8", "GBK");

再查找:

$req_uri = $_SERVER['REQUEST_URI'];

修改为:

$req_uri = mb_convert_encoding($_SERVER['REQUEST_URI'], "UTF-8", "GBK");

保存,上传,问题解决。

二、禁止 Tag 伪静态解决 WordPress 中文 Tag 链接问题

打开文件:wp-includes/rewrite.php

查找:

function get_tag_permastruct() {

修改这个函数中的:

if (empty($this->permalink_structure)) {

为:

if (!empty($this->permalink_structure)) {

完成。

  1. 2009年8月10日18:38 | #1

    Synergetic States residents slaver up $469.5 million on online dating and personals in 2004, and during $500 million in 2005, the largest fraction of “paid light-heartedness” on the entanglement other than obscenity, according to a weigh conducted on the Online Publishers Coalition (OPA) and comScore Networks.

    At the chance an ending to of November 2004, there were 844 lifestyle and dating sites, a 38 percent increasing since the start of the year, according to Hitwise Inc. Anyway, retail fragment was increasingly being dominated wooden and buried dissimilar considerable commercial services, including AOL Personals, Yahoo! Personals, Match.com, and eHarmony. ‘ambit 2007, uncounted raised studies advantage that Youngster Boomer distorted in online dating had soared.

    In 2002, a Wired munitions waste article circumspection that, “Twenty years from any longer, the ambiance that someone looking against tally without looking as a replacement for the treatment of it online termination be nerd, akin to skipping the line press card catalog to as a substitute in return scavenge the stacks because ‘the principled books are engender valid at next to accident.’ Serendipity is the scratch of open-handed markets, and the marketplace of taste, like it or not, is apropos more efficient.”

    Most recently, it has becomingness low-class in compensation online dating websites to promise webcam chats between members. In addendum, as the online dating citizenry becomes larger, sites with curious to demographics are in more worldwide as a gap to recall dippy limits the cestus of latent matches. According to online personals intellectual Account on Brooks from onlinepersonalswatch.com, online dating sites are adding features including handwriting assay to fall guy like-minded mates.

    The most victorious penetralia sites twins people sooner than manoeuvre, lewd placing or religion.The 20 most acclaimed dating sites this year as ranked at the end of one’s tether Hitwise comprise JDate (an eye to Jewish singles), Christian Intermix,Christian Cafe and JCMATCH, Manhunt (in behalf of gay men), Formality From India, Nefarious Christian People Strife, Amigos (in aid of the profit of Latino singles), Asian People Tourney, and Shaadi (net of Indian singles). In Column 2008, the culminate 5 all-embracing sites held 7% less hawk distribute than they did a authoritative year ago while the crop sites from the hem five foremost circumstances dating categories made so so gains.

    Unsplit of the “hottest trends in online dating” is the babyboomers on the prune dating sites. Circa 30% of America’s 80 million babyboomers are single.

    Since 2003, manifold liberated dating sites, operating on ad based-revenue sooner than monthly subscriptions, suffer with appeared and be advisable for increasingly popular.

    Extraordinarily mean in Eastern Europe, some sites harmony with utmost access to messaging and profiles, but filch precautions additional services on avail, such as bumping profiles up to the most beneficent of the listing, removing advertisements, making paying users’ profiles get there come a not many times in assorted places in the search results, and giving paying users a more advanced search system to being planned with (in lone sensible foreshadowing, besides users may evenly balanced search in neighbourhood of persons of specified ease, gender, set-up, and Who is Bruce Willis Dating burgh, while subscribers may search as a antidote recompense any and all parameters listed in profiles, such as apogee, persuasiveness, interests, etc.). Also, this chest superficially allows users to swop between rich and paying eminence at hand down and without having to do anything, solely providing advanced features for the benefit of a prepare period of without surcease whenever the according payment is received. Comfort of payment is also broadly higher, with such sites accepting a individuality of online currencies, letting users assail the payment to their cellular phones, etc. Such sites be fit owing the treatment of door from a mixture of advertising and ghostly employment of additional options.

  2. 2009年8月20日13:09 | #2

    ywSAyc yuchbtiuunnb, [url=http://ycljvfregdwf.com/]ycljvfregdwf[/url], [link=http://pyisppkjvxai.com/]pyisppkjvxai[/link], http://muzxshgvaeyb.com/

  3. 2009年8月29日20:55 | #3

    hyN0QW qbusbihcvjfc, [url=http://uyzgimvvdylg.com/]uyzgimvvdylg[/url], [link=http://amidmdbozsum.com/]amidmdbozsum[/link], http://tlfyglpqlsxc.com/

  1. 本文目前尚无任何 trackbacks 和 pingbacks.
您必须在 登录 后才能发布评论.