CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2007
    Posts
    63

    Exclamation PHP: how to restrict a user from accessing directory structure by changing the URL

    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 say, http://mysite/dir1/

    even though there is no index webpage, the directory structure gets exposed here. 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.

  2. #2
    Join Date
    May 2002
    Posts
    10,943

    Re: PHP: how to restrict a user from accessing directory structure by changing the UR

    Read up on .htaccess
    If the post was helpful...Rate it! Remember to use [code] or [php] tags.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured