vertigoalopolus Posted March 4, 2009 Share Posted March 4, 2009 im working on a project site that has its document root set to ~/sitename/www/, which holds all publicly accessible files (images, css, templates), and an .htaccess file with a mod_rewrite rule that points literally everything that isnt a valid and publicly accessible file to redirect.php, in the parent directory ~/sitename/. however, when i try to load up the sites domain, it returns a 400 bad request error code. i tried copying redirect.php to ~/sitename/www/, and modifying the .htaccess accordingly, and it accesses it fine in there. but i dont want that file (or its siblings - including subdirectories holding controllers) directly accessible by the public! is there a way i could have those files in the parent directory accessible by the web server, but still not publicly accessible? this is for an ongoing MCV style site framework that ive been working on for some time for the sites i build, so a solution would be appreciated! Quote Link to comment Share on other sites More sharing options...
RussellReal Posted March 4, 2009 Share Posted March 4, 2009 well, I'd suggest sending it to error.php?errlala andthen if errlala is set then include redirect.php sincephp will have access to /sitename/ Quote Link to comment Share on other sites More sharing options...
vertigoalopolus Posted March 4, 2009 Author Share Posted March 4, 2009 thank you for the reply, but i think you misunderstand. maybe someone else could help? Quote Link to comment Share on other sites More sharing options...
RussellReal Posted March 4, 2009 Share Posted March 4, 2009 no I understand you, but what else could u do? lol Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.