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. Quote 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. Quote 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. Quote Link to comment https://forums.phpfreaks.com/topic/89957-directory-visable-to-all/#findComment-461799 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.