Jump to content
EmmanuelCorrea

Hide address bar directory in hosting.

Recommended Posts

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

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?

 

 

Share this post


Link to post
Share on other sites

/index/.htaccess:

DirectoryIndex welcome.php

Make your links use http://www.school.com/index.

Share this post


Link to post
Share on other sites

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).

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.