Krewe Posted October 30, 2011 Share Posted October 30, 2011 Hey Guys, I need a tutorial or something that explains htaccess.I need it to hide my database info for my site.If you can explain it great, if you have a website link awesome, I just need to learn it. Or if you have a better idea to make information/.php files secure I'll listen . Krewe Link to comment Share on other sites More sharing options...
Ingolme Posted October 30, 2011 Share Posted October 30, 2011 Your database information isn't available to anybody. PHP files don't show their source code when viewed over HTTP. Link to comment Share on other sites More sharing options...
Krewe Posted October 30, 2011 Author Share Posted October 30, 2011 Your database information isn't available to anybody. PHP files don't show their source code when viewed over HTTP.Yes, but if someone some how got the .php from the server all they would have to do is open it. Link to comment Share on other sites More sharing options...
Ingolme Posted October 30, 2011 Share Posted October 30, 2011 They can't get the file from the server unless you've given them FTP access. Link to comment Share on other sites More sharing options...
Krewe Posted October 31, 2011 Author Share Posted October 31, 2011 Well I'll trust ya Fox Link to comment Share on other sites More sharing options...
boen_robot Posted November 1, 2011 Share Posted November 1, 2011 You don't have to ... open up your browser, start a PHP file that does some DB stuff, and then right click on the page and click "View Source". What you see there is what everyone can see. You shouldn't be seeing your DB details there. You shouldn't be seeing any of your PHP code there in fact. Link to comment Share on other sites More sharing options...
Synook Posted November 2, 2011 Share Posted November 2, 2011 http://w3schools.invisionzone.com/index.php?showtopic=40462 Link to comment Share on other sites More sharing options...
Krewe Posted November 3, 2011 Author Share Posted November 3, 2011 I was actually following that thread Synook so I got all my answers! Thanks. However, when I used Fox's code it gives the folder a 500 error when someone types it in. Link to comment Share on other sites More sharing options...
Ingolme Posted November 3, 2011 Share Posted November 3, 2011 You wrote the code literally as I have it in my post? Is there anything else in your htaccess file? Link to comment Share on other sites More sharing options...
Krewe Posted November 6, 2011 Author Share Posted November 6, 2011 Nope, I put that code into the htaccess file and put the file into the folder I wanted to deny access too. That's it; ---Fixed---All I did was re upload it. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.