php - Nginx, always use specific file for specific extension -


not sure how word or best way ask looking way in nginx run specific file php.

basically if file php file run file instead.

so request www.domain.com/info.php run /home/user/system/request.php instead.

the reason have older tool need adjustments , want split off code gradually make compatible laravel. rather adding require @ top of 3000+ files rather load code, using path load specific file (this way gradually bits , pieces can rebuilt in laravel seamlessly).

any ideas?

try try_files directive:

location ~ \.php$ {     try_files $uri /home/user/system/request.php;     # php-fpm config } 

http://nginx.org/en/docs/http/ngx_http_core_module.html#try_files


Comments

Popular posts from this blog

yii2 - Yii 2 Running a Cron in the basic template -

asp.net - 'System.Web.HttpContext' does not contain a definition for 'GetOwinContext' Mystery -

wso2esb - How to concatenate JSON array values in WSO2 ESB? -