| | |
.htaccess mod_rewrite to php login
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
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
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!
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
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
![]() |
Other Threads in the PHP Forum
- Previous Thread: php\sql error
- Next Thread: mime_content_type not working
| Thread Tools | Search this Thread |
advanced alerts apache api archive array autosuggest beginner binary broken cakephp checkbox class clients cms code cron curl database date datepart display dynamic echo email emptydisplayvalue eregi error execute explodefunction file files folder form forms function functions google hack href htaccess html if...loop image include insert ip javasciptvalidation javascript joomla keywords library limit link login mail matching menu mlm multiple mysql object oop password paypal pdf php phpincludeissue query radio random recursion recursive remote script search searchbox server sessions shot smarty sms source space speed sql syntax system table tutorial update upload url validator variable vbulletin video web website youtube





