Bae Website: Configure app. conf to implement a single entry

Source: Internet
Author: User

When building a website in Baidu application Engin, if you want to use the MVC framework, you often need to set up a single portal. However, Bae Web ServicesProgram(Apache or lighthttp) is transparent to users. Developers cannot modify the configuration file or the. htaccess file to implement a single portal. However, Bae provides the app. conf configuration file in the root directory of the application. You can rewrite the file and set the cache time by modifying it.

The following APP. conf redirects all requests except text files, images, and video files to index. php.

 

 
Handlers:-expire :. JPG modify 10 years-expire :. SWF modify 10 years-expire :. PNG modify 10 years-expire :. GIF modify 10 years-expire :. JPG modify 10 years-expire :. ICO modify 10 years-URL: ^ (. *\. JS) $ Script:/$1-URL: ^ (. *\. CSS) $ Script:/$1-URL: ^ (. *\. JPG) $ Script:/$1-URL: ^ (. *\. GIF) $ Script:/$1-URL: ^ (. *\. JPEG) $ Script:/$1-URL: ^ (. *\. PNG) $ Script:/$1-URL: ^ (. *\. BMP) $ Script:/$1-URL: ^ (. *\. SWF) $ Script:/$1-URL: ^ (. *\. ICO) $ Script:/$1-URL: ^ (. *\. JPG) $ Script:/$1-URL: ^ (. *\. TXT) $ Script:/$1-URL: ^ (. *) $ Script:/index. PHP

Source:
The technical blog http://it.zuocheng.net of Cheng "bae website single portal configuration app. conf"

 

 

 

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.