Dedecms 5.7 Pseudo-static configuration method

Source: Internet
Author: User

1 Does your host support pseudo static? This is very important, otherwise it is no good to say any more below. In short, the Apache server pseudo static implementation requires the help of the. htaccess file; The IIS server pseudo static implementation needs to load the rewrite component and then configure the Httpd.ini file;
Extended reading: Windows2003 iis6/7 pseudo static component download/install/configure (with pseudo static rules)
2dedecms V5.7 Management background-system-system basic Parameters-module settings, "Whether to use rewrite" select "Yes", "question and answer module of the two domain name" fill out "ask";

Why do you want to fill out the two-level domain name of the question and answer module? Since the pseudo static modification method of the puzzle is to refer to the URL form of Dedecms V5.5 and 5.6 Questions and answers, the target URL ends with ". html" and is believed to be unfamiliar to friends who have used the historical version of the quiz system.
such as: http://localhost/ask/question-4.html such a URL in the Dedecms V5.7 will have a problem, many "? ct=" links will not be able to access, such as "My Question", "My Answer", "raise a Reward", "edit /delete Issue "and so on, will produce 404 error pages.
such as: Http://localhost/ask/question-4.html?ct=myask in fact, the emergence of this phenomenon, mainly in the template link path problem, using the relative path. And the question and answer module of the two-level domain name, combined with template modification can be a good solution. Of course, you can also modify the template to achieve a question-and-answer station pseudo static, just add a few more pseudo static rules.
3 Dedecms 5.7 Question and answer pseudo-static rules

IIS server pseudo static rules, adding in the Httpd.ini file:

The code is as follows Copy Code
#问答首页
#RewriteRule ^ (. *)/index.html $1/index.php [I]
#问答详细页
Rewriterule ^ (. *)/question-([0-9]+). HTML $1/?ct=question&askaid=$2 [I]
#问答一级栏目
Rewriterule ^ (. *)/browser-1-([0-9]+). HTML $1/?ct=browser&tid=$2 [I]
#问答一级栏目分页
Rewriterule ^ (. *)/browser-1-([0-9]+)-page-([0-9]+). HTML $1/?ct=browser&tid=$2&page=$3 [I]
#问答子栏目
Rewriterule ^ (. *)/browser-2-([0-9]+). HTML $1/?ct=browser&tid2=$2 [I]
#问答子栏目分页
Rewriterule ^ (. *)/browser-2-([0-9]+)-page-([0-9]+). HTML $1/?ct=browser&tid2=$2&page=$3 [I]
# Wonderful recommendations, problems to be solved, high reward issues, new solutions, 0 answer questions, fast expiration questions (including first level columns, sub columns and their pagination)
Rewriterule ^ (. *)/browser-([0-9]+). HTML $1/?ct=browser&lm=$2 [I]
Rewriterule ^ (. *)/browser-([0-9]+)-page-([0-9]+). HTML $1/?ct=browser&lm=$2&page=$3 [I]
Rewriterule ^ (. *)/browser-1-([0-9]+)-([0-9]+). HTML $1/?ct=browser&tid=$2&lm=$3 [I]
Rewriterule ^ (. *)/browser-1-([0-9]+)-([0-9]+)-page-([0-9]+). HTML $1/?ct=browser&tid=$2&lm=$3&page=$4 [I]
Rewriterule ^ (. *)/browser-2-([0-9]+)-([0-9]+). HTML $1/?ct=browser&tid2=$2&lm=$3 [I]
Rewriterule ^ (. *)/browser-2-([0-9]+)-([0-9]+)-page-([0-9]+). HTML $1/?ct=browser&tid2=$2&lm=$3&page=$ 4 [I]
#全部分类
Rewriterule ^ (. *)/type.html $1/?ct=type [I]
#问答搜索
Rewriterule ^ (. *)/search.html $1/?ct=search [I]
#总积分排行 Week points up ranking view personal information

Rewriterule ^ (. *)/myask-view-([0-9]+). HTML $1/?ct=myask&ac=view&mid=$2 [i]apache server pseudo static rule, add in. htaccess file:

The code is as follows Copy Code
Rewriterule ^index.html$ index.php
Rewriterule ^question-([0-9]+). html$? ct=question&askaid=$1
Rewriterule ^browser-1-([0-9]+). html$? ct=browser&tid=$1
Rewriterule ^browser-1-([0-9]+)-page-([0-9]+). html$? ct=browser&tid=$2&page=$3
Rewriterule ^browser-2-([0-9]+). html$? ct=browser&tid2=$1
Rewriterule ^browser-2-([0-9]+)-page-([0-9]+). html$? ct=browser&tid2=$2&page=$3
Rewriterule ^browser-([0-9]+). html$? ct=browser&lm=$1
Rewriterule ^browser-([0-9]+)-page-([0-9]+). html$? ct=browser&lm=$1&page=$2
Rewriterule ^browser-1-([0-9]+)-([0-9]+). html$? ct=browser&tid=$1&lm=$2
Rewriterule ^browser-2-([0-9]+)-([0-9]+)-page-([0-9]+). html$? ct=browser&tid2=$1&lm=$2&page=$3
Rewriterule ^browser-2-([0-9]+)-([0-9]+). html$? ct=browser&tid2=$2&lm=$3
Rewriterule ^browser-2-([0-9]+)-([0-9]+)-page-([0-9]+). html$? ct=browser&tid2=$1&lm=$2&page=$3
Rewriterule ^type$? ct=type
Rewriterule ^search.html$? ct=search
Rewriterule ^myask-view-([0-9]+). html$? ct=myask&ac=view&mid=$14)

Modify the Dedecms 5.7 question and Answer module code source and template to meet the above pseudo static rules, taking into account the individual webmaster on the HTML and PHP code is not too familiar with the following directly to the small correction of a good question and answer module shared out:
Dedecms 5.7 Question and Answer module source code modification + Pseudo-static rule download (GBK version)
After downloading, direct coverage can be used, small spell not dry "pit Dad" thing, are the official source code based on the modification, no third party garbage information exists, rest assured to use the bar:-)
Dedecms 5.7 questions and answers pseudo static modification considerations
1 Pay attention to backup your site ask folder, to prevent errors, easy to restore;
2) above the question and answer pseudo static only for DedeCMS5.7 GBK version use, UTF version please convert the code;
3 Considering SEO, Many dream old users are v5.1~v5.6 version upgrade to V5.7, small spell to provide the modification to ensure that the history of the version of the URL consistency, or URL changes are very affected seo/seo.html "target=" _blank "> Search engine included and ranked;
4) You can refer to the next small puzzle question and answer pseudo static implementation idea, summed up a set of personal site style of pseudo static method.
Dedecms 5.7 Q/A pseudo-static primary solution
If you're afraid of trouble, and you're skeptical, use the official default pseudo static method, only to implement pseudo static for question and answer pages and detailed pages, you can use the following pseudo-static rules:
IIS Server, In the Httpd.ini file, add:

  code is as follows copy code
#问答首页
# Rewriterule ^ (. *)/index.html $1/index.php [I]
#问答详细页
Rewriterule ^ (. *)/([0-9]+). HTML $1/?ct=question& askaid=$2 [i]
#问答一级栏目
#RewriteRule ^ (. *)/([0-9]+) $1/?ct=browser&tid=$2 [i]
#问答子栏目
#RewriteRule ^ (. *)/t ([0-9]+) $1/?ct=browser&tid2=$2 [I]apache server, add in. htaccess file:
rewriterule ^index.html$ index.php
Rewriterule ^ ([0-9]+). html$ ct=question&askaid=$1
Rewriterule ^ ([0-9]+) $ ct=browser&tid=$1
Rewriterule ^t ([0-9]+) $? ct=browser&tid2=$1

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.