no.154 Configuration Zen Road: How to set up Zen channel system for static access

Source: Internet
Author: User

Zen Road Two access modes are supported, one is the get mode, and the access address is in this form/?m=xx&f=xx.

There is also a static access mode, whose access address is shaped like/usr-login.html.

Statically accessed URL addresses are more concise and intuitive than get methods.

This article shows you how to configure Zen paths through static access.


One, Apache configuration

1, first, to load the rewrite module.

Find the Apache configuration file, usually in the Apache directory below the conf/httpd.conf. Check that the rewrite module is loaded. If it is not loaded, it is opened. Then restart the Apache server.

The configuration file under Windows is as follows:LoadModule rewrite_module modules/mod_rewrite.so. If there is a # in front of it, remove it.

Under Linux, open Rewrite, depending on the actual situation.

2. Check the overwrite options for. htaccess files

Open the Apache configuration file, check for options such as allowoverride , and if None , change it to all. (allowoverride may have multiple, select a directory related to Zen, or replace it all.) )

3, Zen Road One-click installation package By default, the rewrite module and the allowoverride option are turned on, so you can ignore the above two steps.


Ii. Configuration of Zen Road

Open the config/my.php and change the RequestType to Path_info.

1 <?php

2 $config->installed = true; Flag is already installed.

3 $config->debug = true; Whether to turn on the debug feature. If the system is not functioning properly, you can set it to true.

4 $config->requesttype = 'path_info'; How to get information about the current request, optional value: path_info| GET.


Third, frequently asked questions

IIS we have not configured, theoretically speaking, should also support static access. But it could be more troublesome. If you have a friend configured successfully, please let us know the plan.

If you have configured the static access mode and the Zen path is not working properly, you can change it to get mode. The Get method is the most common type of access.


no.154 Configuration Zen Road: How to set up Zen channel system for static access

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.