EmmanuelCorrea Posted June 11, 2018 Share Posted June 11, 2018 What configuration, code or service is needed to hide root directories from a hosting. When I access it, do not show me what PHP classes I'm in. If so, hide folders but keep making use of the chain of classes that have a relationship. Quote Link to comment https://forums.phpfreaks.com/topic/307368-hide-address-bar-directory-in-hosting/ Share on other sites More sharing options...
requinix Posted June 11, 2018 Share Posted June 11, 2018 And your question is...? If you want to know how you can hide URLs from the browser, you cannot. If you want to know how you can hide your code from the browser then... then I don't know what to say to that because it's a silly question. Quote Link to comment https://forums.phpfreaks.com/topic/307368-hide-address-bar-directory-in-hosting/#findComment-1558908 Share on other sites More sharing options...
ginerjm Posted June 11, 2018 Share Posted June 11, 2018 You need to express yourself better. The terms you are using are not very specific and don't tell us what you want to do. Going with your original post here are some things in reply: you can't 'hide' your root directory. What would be the point of it anyway? That is your website's primary focus, or what should be. 'hide php classes'? As you know php doesn't show up on your web pages - it is processed on your server and the output of that is html/js/css code, not php code. Unless you are talking about people using an ftp client to access your root folder which if possible indicates a serious lack of security in your entire web site. Please clarify: 'a hosting'. What do you define those words to mean? Also: what is the 'it' in the following: 'When I access it'. See what I mean about your post? Not very clear as to what you so plainly can see in front of you but which we cannot. Quote Link to comment https://forums.phpfreaks.com/topic/307368-hide-address-bar-directory-in-hosting/#findComment-1558910 Share on other sites More sharing options...
gizmola Posted June 11, 2018 Share Posted June 11, 2018 It is hard to understand what you mean. Can you clarify your question? Are you talking about using an IDE to access your site source files? If so, which one? Are you using an FTP client? Often clients and IDE that support remote access to files have ways to configure the home directory for a site. I interpreted your question to be along those lines. Quote Link to comment https://forums.phpfreaks.com/topic/307368-hide-address-bar-directory-in-hosting/#findComment-1558916 Share on other sites More sharing options...
EmmanuelCorrea Posted June 12, 2018 Author Share Posted June 12, 2018 9 hours ago, gizmola said: It is hard to understand what you mean. Can you clarify your question? Are you talking about using an IDE to access your site source files? If so, which one? Are you using an FTP client? Often clients and IDE that support remote access to files have ways to configure the home directory for a site. I interpreted your question to be along those lines. My website shows something like that. www.school.com/index/welcome.php, what I want to achieve is to show only www.school.com/index. Quote Link to comment https://forums.phpfreaks.com/topic/307368-hide-address-bar-directory-in-hosting/#findComment-1558922 Share on other sites More sharing options...
gizmola Posted June 12, 2018 Share Posted June 12, 2018 What you are asking for does not make sense nor is it possible. What you could have is something like this: http://www.school.com/index/welcome Are you running Apache or Nginx? Quote Link to comment https://forums.phpfreaks.com/topic/307368-hide-address-bar-directory-in-hosting/#findComment-1558924 Share on other sites More sharing options...
EmmanuelCorrea Posted June 12, 2018 Author Share Posted June 12, 2018 18 minutes ago, gizmola said: Lo que estás pidiendo no tiene sentido ni es posible. Lo que podrías tener es algo como esto: http://www.school.com/index/welcome ¿Estás ejecutando Apache o Nginx? I'm using php. I read something about hidden files with .htaccess Quote Link to comment https://forums.phpfreaks.com/topic/307368-hide-address-bar-directory-in-hosting/#findComment-1558925 Share on other sites More sharing options...
requinix Posted June 12, 2018 Share Posted June 12, 2018 /index/.htaccess: DirectoryIndex welcome.php Make your links use http://www.school.com/index. Quote Link to comment https://forums.phpfreaks.com/topic/307368-hide-address-bar-directory-in-hosting/#findComment-1558926 Share on other sites More sharing options...
gizmola Posted June 13, 2018 Share Posted June 13, 2018 You misunderstood my question. What webserver are you using? Rewrites are typically supported by the webserver itself, so it's important to know if you are using PHP with Apache (typically with mod_php) or using PHP with Nginx (typically using php-fpm). Quote Link to comment https://forums.phpfreaks.com/topic/307368-hide-address-bar-directory-in-hosting/#findComment-1558938 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.