pdenlinger Posted January 14, 2007 Share Posted January 14, 2007 Hi--Up until now, I have been using Dreamweaver MX 2004 on a WinXP machine to develop my website. On my local machine, I have kept my site directory under My Documents.Recently, I have started learning PHP, and have downloaded XAMPP. Since I already have a website, I have access to a PHP webserver to test my PHP files and documents.I have read that for many open-source configurations, I should store all my websites in the htdocs directory, which is directly under my C:\ drive.Can you please tell me which I should do? Should I continue to keep my site under My Documents, or should I move everything to the htdocs directory? If I move everything to htdocs, what other files should I keep in the same directory?Can you explain the pros and cons?Thank you.pdenlinger Quote Link to comment Share on other sites More sharing options...
hackerkts Posted January 18, 2007 Share Posted January 18, 2007 This category is for wamp, but oh well.. If you put your website into htdocs folder you can just view them from http://localhost/ etcs.. Quote Link to comment Share on other sites More sharing options...
bibby Posted January 21, 2007 Share Posted January 21, 2007 It sounds like you have a similar setup than I do on my laptop.http://localhost/ == C:\www\Apache\htdocsI keep a directory outside of htdocs where I keep htaccess password files and sql connects, but for the most part, htdocs has everything else. How you then setup your site is up to you, but since I have multiple projects with only one address, I have a directory for each./htdocs/projectA/and these generally have the same subdirs /htdocs/projectA/cls/htdocs/projectA/css/htdocs/projectA/js/htdocs/projectA/docsand maybe/htdocs/projectA/tpl Quote Link to comment Share on other sites More sharing options...
sushant_d84 Posted February 5, 2007 Share Posted February 5, 2007 HI Can u please tell me about.htaccess file.and how to use it.. Please let me know RegardsSushant[quote author=bibby link=topic=122377.msg509610#msg509610 date=1169361253]It sounds like you have a similar setup than I do on my laptop.http://localhost/ == C:\www\Apache\htdocsI keep a directory outside of htdocs where I keep htaccess password files and sql connects, but for the most part, htdocs has everything else. How you then setup your site is up to you, but since I have multiple projects with only one address, I have a directory for each./htdocs/projectA/and these generally have the same subdirs /htdocs/projectA/cls/htdocs/projectA/css/htdocs/projectA/js/htdocs/projectA/docsand maybe/htdocs/projectA/tpl[/quote] Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted February 10, 2007 Share Posted February 10, 2007 htaccess file is basically an external configuration file for Apache which is read during run time (when viewing a directory/file on the server). With htaccess you can give each directory under the document root a different set of settings. htaccess files work on a per directory basis and all other subsequent folders are affected too, for example say your setup is this:c:\htdocs | +--folder1 | | | |-.htacces | | | +--- sub-folder1 | | | +--- sub folder2 | +--- folder2all files/folders in the htdocs folder will abide by the Apaches main configuration. However sub folder1 and sub folder2 inside folder1 and folder1 itself will also abide the configuration from the .htaccess file in folder1. folder2 will not be affected or any file/folder outside of folder1For the ideal directory structure I install everything webserver related into the root of hard drive in a folder called Server. It looks like this:[code]C:\Server | +--- Apache2 +--- MySQL +--- PHP +--- www (this is where i store my files, not Apache2/htdocs)[/code]I have also got phpMyAdmin in the Server folder too and added an Alias to Apaches configuration so I can access it via the following url:http://localhost/pma Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.