Jump to content

how to restrict a user from accessing directory structure by changing the URL?


mintoo2cool

Recommended Posts

How to configure the server to restrict a user from accessing the directory structure, by changing the URL?

 

for example: if the server redirects the user to the following URL upon successful login.

http://mysite/dir1/dir2/dir3/phpfile.php

 

currently, if i try change the URL to http://mysite/dir1/

 

even though there is no index webpage for dir1/, the directory structure gets exposed.

how do i go about restricting the user from accessing the directory structure and throw an error message at him like "you are not authorised to view this", whenever a "smarty-pants" user tries to edit the URL manually.

 

The user should only be able to see the webpages which the server redirects him to. nothing else.

 

How to configure the PHP server such that, if the URL is modified manually, server should redirect to an error page instead of exposing the directory structure.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.