Posts tagged .htaccess

Make .htaccess visible via ftp vsftpd


If you have vsfpd as a ftp client.

find your vsftpd.conf file and add the line:


then restart your ftp server in command line

service vsftpd restart



This article is a slightly modified article from a great blog post at about how to have our own php.ini with dreamhost.Thank you for your work:
0-Set up your domain for FastCGI (usually it is the case by default)
Login your Dreamhost, enter Manage Domains, Edit your domain setup, in Web Options->PHP mode, select ‘PHP 5 FastCGI’

  1. Download DreamHost Custom PHP.ini from DeamHost Scripts and Tips. Or attached here as of today dh-phpini
  2. Extract the dh-phpini.php from and upload it to you website root.
  3. Open dh-phpini.php in you browse. Example:
  4. Then, this result shows,
  5. After install, this script create ‘cgi-bin’ folder in you website root, including ‘php.ini’ files in the folder, and add this lines in you .htaccess file, if they are not there already:

AddHandler fastcgi-script fcg fcgi fpl
AddHandler php-fastcgi .php
Action php-fastcgi /cgi-bin/dispatch.fcgi

6. Default, the Max upload file size increase to 20M, if you want to change to more, edit php.ini file in ‘cgi-bin’ folder like this,

post_max_size = 50M

upload_max_filesize = 50M

7.For changes to the new php.ini file to take effect , you’ll probably need to restart FastCGI for them to take effect.

Unfortunately you can’t do this from the Dreamhost Control Panel. You need to log in via SSH, and issue the command “killall -9 php5.cgi” to restart FastCGI.

.htaccess Guide


General Information [ ^ ]

.htaccess Definition1 [ ^ ]

Apache server software provides distributed (i.e., directory-level) configuration via Hypertext Access files. These .htaccess files enable the localized fine-tuning of Apache’s universal system-configuration directives, which are defined in Apache’s main configuration file. The localized .htaccess directives must operate from within a file named .htaccess. The user must have appropriate file permissions to access and/or edit the .htaccess file. Further, .htaccess file permissions should never allow world write access — a secure permissions setting is “644”, which allows universal read access and user-only write access. Finally, .htaccess rules apply to the parent directory and all subdirectories. Thus to apply configuration rules to an entire website, place the .htaccess file in the root directory of the site.

Commenting .htaccess Code [ ^ ]

Comments are essential to maintaining control over any involved portion of code. Comments in .htaccess code are fashioned on a per-line basis, with each line of comments beginning with a pound sign #. Thus, comments spanning multiple lines in the .htaccess file require multiple pound signs. Further, due to the extremely volatile nature of htaccess voodoo, it is wise to include only alphanumeric characters (and perhaps a few dashes and underscores) in any .htaccess comments.

Continue reading “.htaccess Guide” »

Go to Top