How can I return static files in PHP?
问题 I use a .htaccess file to redirect all requests to the same index.php . From there, I decide what to do depending on URL of the incoming request. For now, I map the request URL to directory structure relative to a source folder, so that example.com/user/create maps to source/user/create/index.php . The file located there can handle the request as needed, and generate HTML output. But that doesn't work for static assets, the browser may request. So my idea is to find out whether a request URL