Results 1 to 2 of 2

Thread: .htaccess redirect to certain directory based on username entered.

  1. #1
    nickfran Guest

    .htaccess redirect to certain directory based on username entered.

    Using .htaccess can I redirect user to certain directory based on the username and password they enter? I.E.

    1. I have a .htacess password protected directory, www.mydomain.com/protected
    2. Based on the username or password they enter can they be redirected to their own personal directory?
    3. If username is john.smith they go to www.mydomain.com/protected/1 but if username is jane.smith then they would go to www.mydomain.com/protected/2 and so on....

    Can this be done in PHP? Thanks!
    - Nick

  2. #2
    Join Date
    Apr 2009
    Location
    The toon
    Posts
    1,225
    it can be done using PHP but I suggest a different approach

    store the users in a database and validate against that user table

    The content each user can see is driven by a content table. The content table holds everything a user can access including text and downloads etc. Like a micro CMS

Similar Threads

  1. .htaccess redirect for files without extensions
    By mickapoo in forum Client & Server Side Scripting (PHP, ASP, JavaScript)
    Replies: 0
    Last Post: 03 Nov 2008, 09:06 PM
  2. Toronto GTA Based Business Service Directory
    By morestar in forum Website Design Reviews
    Replies: 0
    Last Post: 31 Dec 2007, 04:19 PM
  3. Web directory / High quality Web directories
    By tdd1984 in forum Search Engine Optimization and Marketing
    Replies: 1
    Last Post: 02 Jan 2007, 10:08 AM

Posting Permissions

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