behzad Posted February 7, 2008 Share Posted February 7, 2008 Hi there guys, I have a question about direct access to directory. On my domain is typed in the browser www.mydomain.com/admin/" this shows all the content of that folder. Is there a way to avoid this so it is not visible to the browser and it redirects to the main page like login.php or so. Link to comment https://forums.phpfreaks.com/topic/89957-directory-visable-to-all/ Share on other sites More sharing options...
powerspike Posted February 8, 2008 Share Posted February 8, 2008 you could put a index.php file in the file with the contents of <? header("Location: <url to redirect >"); ?> that should do what you want. Link to comment https://forums.phpfreaks.com/topic/89957-directory-visable-to-all/#findComment-461608 Share on other sites More sharing options...
unidox Posted February 8, 2008 Share Posted February 8, 2008 You can also add a .htaccess and restrict any access to it. Link to comment https://forums.phpfreaks.com/topic/89957-directory-visable-to-all/#findComment-461799 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.