Dedecms V5.7 question and answer pseudo static configuration method

Source: Internet
Author: User

Let's take a look at the official upgrade instructions for the Dedecms 5.7 question and Answer module:
1 The question and answer module is reconstructed by the modular MVC architecture.
2 The question and answer module supports pseudo static setting;
3 redesign the front interface of question and answer module, the new interface is consistent with the whole system interface;
4 Customer Service Center uses the new edition question and answer module revision;
5 question and Answer module to increase the level of two domain name support. Through the above instructions, combined with dedecms V5.7 of the question and answer source, can basically determine two information:
1 Dedecms 5.7 Question and answer module still supports pseudo static;
2 because of the upgrade of the question-and-answer module, the use of a new URL form, the historical version of the question and answer system pseudo static rules are not applicable to the new version, which also dedecms 5.7 questions and answers pseudo static implementation to solve the focus. Dedecms 5.7 Question and answer pseudo-static advanced solution
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

2 dedecms 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=$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.