.htaccess mod_rewrite to php login

Reply

Join Date: Feb 2008
Posts: 9
Reputation: squid44th is an unknown quantity at this point 
Solved Threads: 0
squid44th's Avatar
squid44th squid44th is offline Offline
Newbie Poster

.htaccess mod_rewrite to php login

 
0
  #1
Feb 23rd, 2008
To begin with, I will state now that I know virtually nothing, zip, zero, zilch about .htaccess and mod_rewrite. That being said, I know it can be done.

What I have is a framed site that has a header/footer plus left menu and main frame. What I have now is a link in the menu for a client login which apears in the main frame. the user input U/P which would go to a php file and verify who they are. Once verified the php login would contain a header("link") to their protected directory.

That part I can handle easily. The hard part is that I also need the directory protected with .htaccess to prevent direct linking. Or when the client bookmarks the page I need them to log in.

I have seen it before at i2 Membership which uses a mod_rewrite to redirect the .htaccess to a php login script. This is what I would like to accomplish.

On a side note, I would also like to prevent downloading of images by putting some other coding in the .htaccess if that is possible too. I have also read and reread the following forum .htacces thread

As of now I have no .htaccess in the directory, but need to do this quickly.

Thanks in Advance for any help.
Squid
Just when you think you've made it idiot proof, along comes a better idiot!
Reply With Quote Quick reply to this message  
Join Date: Feb 2008
Posts: 158
Reputation: richie513 is an unknown quantity at this point 
Solved Threads: 11
richie513's Avatar
richie513 richie513 is offline Offline
Junior Poster

Re: .htaccess mod_rewrite to php login

 
0
  #2
Feb 23rd, 2008
Hi Squid,

I have actually never done this, but yes you are right it can be done. This article should help you out
Redirecting and Rewriting with mod_rewrite

Technology is just a tool. In terms of getting the kids working together and motivating them, the teacher is the most important.
richie513
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the PHP Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC