Today's Question:  What does your personal desk look like?        GIVE A SHOUT

SEARCH KEYWORD -- .htaccess



  Disable directory listings

Preventing directory listings can be very useful if for example, you have a directory containing important '.zip' archive files or to prevent viewing of your image directories. Alternatively it can also be useful to enable directory listings if they are not available on your server, for example if you wish to display directory listings of your important '.zip' files.To prevent directory listings, create a .htaccess file following the main instructions and guidance which includes the following te...

   .htaccess,Disable directory listing,Inde     2011-10-03 14:36:35

  Execute PHP from a .html File

How can I execute PHP code on my existing myfile.html page?:When a web page is accessed, the server checks the extension to know how to handle the page. Generally speaking if it sees a .htm or .html file, it sends it right to the browser because it doesn't have anything to process on the server. If it sees a .php extension (or .shtml, or .asp, etc), it knows that it needs to execute the appropriate code before passing it along to the browser. Here is the problem: You find the perfect ...

   PHP,HTML,PHP in HTML,AddType     2011-12-26 14:01:20

  What can .htaccess file do?

A .htaccess file is a directory-level configuration file supported by several web servers, that allows for decentralized management of web server configuration. What can a .htaccess file do? We summarized some of them here.  Hope it may help you. 1. Timezone settingSometimes when you use date() or mktime() functions in PHP, , it may display some weird information because of the timezone difference. For example, one possible warning is :Warning: date(): It is not safe to rely on the syste...

   .htaccess,setting,tip     2012-06-15 06:39:39

  Setting server timezone

To set your web servers date timezone, for example for Eastern Standard Time (EST) use the following code:SetEnv TZ America/IndianapolisFor example, for Los Angeles time (Pacific time), use the following code:SetEnv TZ America/Los_AngelesOther location examples include:America/New_York - Eastern Time America/Detroit - Eastern Time - Michigan (most locations) America/Louisville - Eastern Time (Louisville, Kentucky) America/Indianapolis - Eastern Standard Time (Indiana, most locatio...

   .htaccess,Server,Time zone,Change     2011-10-03 14:45:33

  How to secure an Ubuntu Apache web server

Securing server software is not a straightforward task. Not all of our operating environments are the same, leading to a variety of potential security vulnerabilities. However, using a few basic configuration and security options, you can stay a little ahead of where you want to be. 1. Fail2ban Fail2ban is a Python-based intrusion prevention software that detects and blocks malicious IP addresses from multiple unsuccessful attempts at software logins. In other words, if someone is attempt...

   Unix server security,Log,.htaccess,Cache     2011-12-27 09:25:32

  Set PHP session timeout

There are many different discussions about PHP sessions. We may often face some weird issues while handling PHP sessions. Sometimes session is expired earlier than expected. Or sometimes the session is not expired. This introduces many confusions. Today we discuss how to set PHP session timeout correctly today. In php.ini, there are three key parameters which will affect the session timeout. session.gc_maxlifetime, session.gc_probability and session.gc_divisor. session.gc_maxlifetime defined the...

   PHP,session,timeout     2013-08-31 08:11:03

  Install and remote access phpMyAdmin on CentOS

phpMyAdmin is a free and open source tool written in PHP intended to handle the administration of MySQL with the use of a Web browser. It can perform various tasks such as creating, modifying or deleting databases, tables, fields or rows; executing SQL statements; or managing users and permissions.Today I walk through you the steps to install phpMyAdmin on CentOS. Actually, these steps are applicable to other Linux systems as well. 1. Download the phpMyAdmin from Sourceforge.net. Run command:wge...

   phpMyAdmin,linux,installation,demo     2012-06-21 07:30:29

  Make Magento 2 Faster: Five Quick tips

In this post, you will learn from Magento development company experts about speeding up the Magento 2. We hope these tips will help you in making Magento 2 faster than before. Magento 2 is a powerful platform. Once installed and with no customization it is a fully functional store. They even give you a well-designed, responsive storefront. However as you add products and your own content things will incrementally begin to slow down. To combat that there are some things you can do to increase spe...

   MAGENTO,MAGENTO TUTORIAL,MAGENTO DEVELOPMENT     2016-07-14 00:17:45

  Some tricks on PHP session

1. Session timeout problem There is a nuance we found with session timing out although the user is still active in the session.  The problem has to do with never modifying the session variable. The GC will clear the session data files based on their last modification time.  Thus if you never modify the session, you simply read from it, then the GC will eventually clean up. To prevent this you need to ensure that your session is modified within the GC delete time.  You can accomp...

   PHP,Session,Timeout,Solution,Various domain     2015-03-13 07:05:37

  PHP Query String

Query string plays important role in building web applications, especially if you want to make nice urls without question mark and many key, value pairs, actually it is not so easy to design application with nice urls however it is always worth doing so, because it not only looks very proffessional, such URLs are search engine friendly, which means that they will get indexed faster but also it happens that search engines have problems with indexing pages with more then 3 key=value pairs in query...

   PHP,Query string,Request,Security     2011-10-01 02:23:15