.htaccess - Forward request FROM custom index.php -
i have existing web application not using framework , add .env support it. in order facilitate thought might best send requests index.php file, register .env contents in $_env array, forward original request on intended destination.
as example, try go http://test.com/dashboard.php, , using htaccess, file redirected http://test.com/index.php. there, environment variables registered every request , send whole request on http://test.com/dashboard.php.
if there easy way accomplish this, or better solution current problem appreciate input. willing use symfony request/response objects if makes things easier.
the easiest solution indeed seems describe: force requests go through index.php, register environment variables, include dashboard.php. whether solid approach can discussed.
using symfony's httpfoundation more solid construction, means you'll have update existing code well. while i'll advice more solid approach based on open source components, investment bit bigger , don't know context don't know whether acceptable.
Comments
Post a Comment