Jump to content

How Can I Create An .htaccess File?

Guest twelves

Recommended Posts

Because I dont have access to my php.ini file to edit it, I was told to create an .htacess file.


But this is out of my skill set.


Should I give up?


Then another thing


The upload script I installed Locked my Mp3 directory when I installed



I dont have any Commercial music on the server FYI.




My page is http://www.12string.net

My upload script is http://www.12string.net/uploader/index.php


The Authors instructions on this is:



faq - frequently asked questions


_ i cannot upload files bigger than 2mb. why?



php has a value that sets the maximum filesize for uploads. this setting defaults to 2mb and can be changed in php.ini.


you have to change the following:

-> upload_max_filesize (defaults to 2M)

-> if necessary increase post_max_size. the value must be greater than upload_max_filesize for big uploads to work.

-> if necessary increase max_execution_time.


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.



Thanks! Im Lost!

Link to comment
Share on other sites

post_max_size in php.ini edit to 12 megs is what I am being told will help.


Although, I may have to go back to Cgi uploaders if I cant get the php.ini file edited.


Although I am not sure where my php.ini file is at.

It must be on the main server and off limits.


Some one said .htaccess editing is not going to do a thing and I need to

configure thehttpd.config file, but on a server that has shared hosting it is not possible.


My last host was very nice about having the post_max_size set very high.


I host Non commercial guitar songs for a small radio station.


But if users can't upload, then I am spinning my wheels and need to move on to CGI and thats BAD!


Don't take this the wrong way, Uploading Mp3 songs to my Radio station is very important to my community page.


Im spending days and days on this.


This is a .htacess file I may upload.

But others said nothing will work.


php_value memory_limit 11M

php_value post_max_size 11M

php_value upload_max_filesize 11M

php_value max_execution_time 600






Is there nothing I can do?


I looked in the Link you gave me. However it did not address my issue.


Thanks though!

Link to comment
Share on other sites



Add the following lines to your .htaccess file:


><IfModule mod_php4.c>
  php_value memory_limit 11M 
  php_value upload_max_filesize 11M 
  php_value max_execution_time 600 


It should work.


Always make a backup of your .htaccess file before mucking around with it.


[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()]


Good luck!



Edited by Wilexa
Link to comment
Share on other sites

Uh oh, you are on to my "secret", google that is :)


twelves sounded in distress!


It did take the time to try it out on one of my sites and check phpinfo().


the upload_max_filesize and max_execution_time look like they update right away. Thumbs Up


I couldn't find memory_limit. :)





Link to comment
Share on other sites

Guest twelves

Thank you all very much.



Sorry if Im a noob at php.


I was goofing around with the uploader all week.


I was having a bad time.


I googled and googled and boogled and bothered the kind folks at

#PHP on IRC and they could not help and this and that and this and that.


All I know is the same Upload script that used to work on another server would not run on totalchoice.


Im going to spend way to much time installing it today..


As far as backing up my .htaccess file???


I don't think I ever had one!

Do you install them default?


Thing is, you can't see them from FTP.


The thing is, I already created a new one and there for, if the old one was there,

I trashed it! I also installed a BLOCK IP address .htaccess for a boycot on the



Although I dont traffic in Commercial Mp3 tunes...I choose to Ban their servers form my page.


So, I thank you very much.


As you can see...If its something I don't know about.

Im a basket case!




:) woooot


Thanks again!

Rock Sign

Thumbs Up

Link to comment
Share on other sites

No problem,


Some ftp programs do not show all files like .htaccess

or files that start with a dot.

You can use cpanel file manager to see a and edit .htaccess

or an ftp program like corelite or others suggested in the suggust software forum will help.


As to the original .htaccess file, I copied mine when I first signed up (I backed up everything) :D the file was

# -FrontPage-

IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*


order deny,allow

deny from all

allow from all

order deny,allow

deny from all

AuthName www.sitename.com

AuthUserFile /home/user/public_html/_vti_pvt/service.pwd

AuthGroupFile /home/user/public_html/_vti_pvt/service.grp

Link to comment
Share on other sites

  • 3 years later...
There is some very good information on .htaccess files

in .htaccess Tutorials located in the Tutorials and Frequently Asked Questions area.


Hope this helps.




I went all the way through the tutorials looking for a general guide to setting up .htaccess and could not find anything.


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 ?



Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...