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"