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
Post a Comment