How Can I Create An .htaccess File?

liunx

Guest
Because I dont have access to my php.ini file to edit it, I was told to create an .htacess file.<br /><br />But this is out of my skill set.<br /><br />Should I give up? <br /><br /> Then another thing<br /><br />The upload script I installed Locked my Mp3 directory when I installed<br />it.<br /><br />I dont have any Commercial music on the server FYI.<br /><br />Thanks.<br /><br />My page is <a href="http://www.12string.net" target="_blank">http://www.12string.net</a><br />My upload script is <a href="http://www.12string.net/uploader/index.php" target="_blank">http://www.12string.net/uploader/index.php</a><br /><br />The Authors instructions on this is:<br /><br /><br />faq - frequently asked questions<br /><br />_ i cannot upload files bigger than 2mb. why?<br /><br /><br />php has a value that sets the maximum filesize for uploads. this setting defaults to 2mb and can be changed in php.ini.<br /><br />you have to change the following:<br />-> upload_max_filesize (defaults to 2M)<br />-> if necessary increase post_max_size. the value must be greater than upload_max_filesize for big uploads to work.<br />-> if necessary increase max_execution_time.<br /><br />if you have no direct access to php.ini you can change the setting for upload_max_filesize using a .htaccess, in case your provider allows this. please ask your provider.<br /><br /><br />Thanks! Im Lost!<!--content-->
There is some very good information on .htaccess files <br />in <a href="http://www.totalchoicehosting.com/forums/index.php?showtopic=3051&hl=\.htacces" target="_blank">.htaccess Tutorials</a> located in the Tutorials and Frequently Asked Questions area.<br /><br />Hope this helps.<!--content-->
post_max_size in php.ini edit to 12 megs is what I am being told will help.<br /><br />Although, I may have to go back to Cgi uploaders if I cant get the php.ini file edited.<br /><br />Although I am not sure where my php.ini file is at.<br />It must be on the main server and off limits.<br /><br />Some one said .htaccess editing is not going to do a thing and I need to <br />configure thehttpd.config file, but on a server that has shared hosting it is not possible.<br /><br />My last host was very nice about having the post_max_size set very high.<br /><br />I host Non commercial guitar songs for a small radio station.<br /><br />But if users can't upload, then I am spinning my wheels and need to move on to CGI and thats BAD!<br /><br />Don't take this the wrong way, Uploading Mp3 songs to my Radio station is very important to my community page.<br /><br />Im spending days and days on this.<br /><br />This is a .htacess file I may upload.<br />But others said nothing will work.<br /><br />php_value memory_limit 11M <br />php_value post_max_size 11M <br />php_value upload_max_filesize 11M <br />php_value max_execution_time 600 <br /><br /><br /><br /> <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/shutup.gif" style="vertical-align:middle" emoid=":shutup:" border="0" alt="shutup.gif" /> <br /><br />Is there nothing I can do?<br /><br />I looked in the Link you gave me. However it did not address my issue.<br /><br />Thanks though!<!--content-->
O well.<br /><br />No luck. <br /><br />Thanks!<br /><br /> woooot<!--content-->
twelves...<br /><br />Add the following lines to your .htaccess file:<br /><br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1--><IfModule mod_php4.c><br /> ?php_value memory_limit 11M <br /> ?php_value upload_max_filesize 11M <br /> ?php_value max_execution_time 600 <br /></IfModule><!--c2--></div><!--ec2--><br /><br />It should work.<br /><br />Always make a backup of your .htaccess file before mucking around with it. <br /><br />[Edited note: Upon further review, the post_max_size line didn't need to be in there, since the default value is already 55M. I am not sure about the memory_limit. It doesn't show in php_info()]<br /><br />Good luck!<br /><br />...dave<!--content-->
LOL, you beat me dave,<br /><br />I love google Thumbs Up <br />I got as far as<br /><br /><IfModule mod_php4.c><br />php_value xxxxxxxx<br /></IfModule><br /><br /><br /><br /><br /><br />edit<br />I did also see<br /><!--quoteo--><div class='quotetop'>QUOTE</div><div class='quotemain'><!--quotec-->not all settings can be changed until you restart PHP on the server<!--QuoteEnd--></div><!--QuoteEEnd--><!--content-->
Uh oh, you are on to my "secret", google that is <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/wink.gif" style="vertical-align:middle" emoid=";)" border="0" alt="wink.gif" /> <br /><br />twelves sounded in distress! <br /><br />It did take the time to try it out on one of my sites and check phpinfo().<br /><br />the upload_max_filesize and max_execution_time look like they update right away. Thumbs Up <br /><br />I couldn't find memory_limit. <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/unsure.gif" style="vertical-align:middle" emoid=":unsure:" border="0" alt="unsure.gif" /> <br /><br /><br /><br />...dave<!--content-->
Thank you all very much.<br /><br /><br />Sorry if Im a noob at php.<br /><br />I was goofing around with the uploader all week.<br /><br />I was having a bad time.<br /><br />I googled and googled and boogled and bothered the kind folks at <br />#PHP on IRC and they could not help and this and that and this and that.<br /><br />All I know is the same Upload script that used to work on another server would not run on totalchoice.<br /><br />Im going to spend way to much time installing it today..<br /><br />As far as backing up my .htaccess file???<br /><br />I don't think I ever had one!<br />Do you install them default?<br /><br />Thing is, you can't see them from FTP.<br /><br />The thing is, I already created a new one and there for, if the old one was there,<br />I trashed it! I also installed a BLOCK IP address .htaccess for a boycot on the <br />R.I.A.A<br /><br />Although I dont traffic in Commercial Mp3 tunes...I choose to Ban their servers form my page.<br /><br />So, I thank you very much.<br /><br />As you can see...If its something I don't know about.<br />Im a basket case!<br /><br />DOH!!!!!<br /><br /> <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/goof.gif" style="vertical-align:middle" emoid=":goof:" border="0" alt="goof.gif" /> woooot <br /><br />Thanks again!<br /> Rock Sign <br /> Thumbs Up<!--content-->
No problem,<br /><br />Some ftp programs do not show all files like .htaccess<br />or files that start with a dot.<br />You can use cpanel file manager to see a and edit .htaccess<br />or an ftp program like corelite or others suggested in the suggust software forum will help.<br /><br />As to the original .htaccess file, I copied mine when I first signed up (I backed up everything) <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/rolleyes.gif" style="vertical-align:middle" emoid=":rolleyes:" border="0" alt="rolleyes.gif" /> the file was<br /><!--quoteo--><div class='quotetop'>QUOTE</div><div class='quotemain'><!--quotec--># -FrontPage-<br />IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*<br /><br /><Limit GET POST><br />order deny,allow<br />deny from all<br />allow from all<br /></Limit><br /><Limit PUT DELETE><br />order deny,allow<br />deny from all<br /></Limit><br />AuthName <!-- w --><a class="postlink" href="http://www">www</a><!-- w -->. />AuthUserFile /home/<b>user</b>/public_html/_vti_pvt/service.pwd<br />AuthGroupFile /home/<b>user</b>/public_html/_vti_pvt/service.grp<!--QuoteEnd--></div><!--QuoteEEnd--><!--content-->
<!--quoteo(post=31949:date=Sep 30 2003, 01:06 PM:name=TCH-Don)--><div class='quotetop'>QUOTE(TCH-Don @ Sep 30 2003, 01:06 PM) <a href="http://www.totalchoicehosting.com/forums/index.php?act=findpost&pid=31949"><img src='http://www.totalchoicehosting.com/forums/style_images/1/post_snapback.gif' alt='*' border='0' /></a></div><div class='quotemain'><!--quotec-->There is some very good information on .htaccess files <br />in <a href="http://www.totalchoicehosting.com/forums/index.php?showtopic=3051&hl=\.htacces" target="_blank">.htaccess Tutorials</a> located in the Tutorials and Frequently Asked Questions area.<br /><br />Hope this helps.<!--QuoteEnd--></div><!--QuoteEEnd--><br /><br /><br />Don<br />I went all the way through the tutorials looking for a general guide to setting up .htaccess and could not find anything.<br /><br />Your post was from about 4 years ago, so the tutorial may have been removed or at least moved, any chance you can give me a specific link to the information ?<br /><br />JayC<!--content-->
<a href="http://httpd.apache.org/docs/1.3/howto/htaccess.html" target="_blank">Apache .htaccess tutorial</a><!--content-->
<a href="http://www.javascriptkit.com/howto/htaccess.shtml" target="_blank">Comprehensive guide to .htaccess</a><br /><a href="http://www.htaccesstools.com/" target="_blank">.htaccess Tools</a><!--content-->
 
Back
Top