Welcome. Here you find latest freeware and legal software as well as latest info about IT Technology.
Showing posts sorted by relevance for query php. Sort by date Show all posts
Showing posts sorted by relevance for query php. Sort by date Show all posts
1. How to allow or deny Access to website.

To Allow:
Order Allow, Deny
Deny from All
Allow from


Order Allow, Deny
Allow from

Note: Order means that process the command according to their position, i.e. Allow command process first and Deny command process after completing the Allow command.

To Deny:
Order Allow, Deny
Deny from
Allow from All


Order Deny, Allow
Deny from

2. For different error codes, generating different error documents in Apache.

ErrorDocument 404 /errdoc/error-404.htm

Where 404 is error code and "/errdoc/error-404.htm" is the page which displays when an 404 error occurred.

3. Defining MIME types for files.
<IfModule mod_mime.c>
AddType application/vbscript vb
AddType application/x-font-ttf ttf ttc

Where application/vbscript is MIME TYPE and vb is its extension.

4. Make available mp3 files or video files for download.

AddType application/octet-stream .mp3 .zip 

Where application/octet-stream is the KEY and ".mp3 .zip" is value for that key. Multiple value can be added for the same key.

5. How to stop executing some files and display as source code in the web browser.

RemoveHandler cgi-script .php .pl .py
AddType text/plain .php .pl .py 

Where .php, .pl, .py is executable files which runs on the server and its output displays on the client.

6. How to limit the uploading and downloading size.

php_value upload_max_filesize 50M
php_value post_max_size 50M
php_value max_execution_time 500
php_value max_input_time 500

7. How to setup directory index for website.

DirectoryIndex index.html index.php mypage.php index.myextension

8. How to setup time zone for website.

SetEnv TZ India/Delhi

Where TZ is the global variable for TIME ZONE and "India/Delhi" is the zone(value) for TZ Key.

9. How to setup GZip compression for files on the website.

<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE application/html
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript

Where text/plain text/html etc... are the MIME types which will compress and send to client when requested.

10. How to enable cache control for website.

<FilesMatch "\.(ico|png|jpeg|svg|ttf)$">
Header Set Cache-Control "max-age=3600, public" </FilesMatch> <FilesMatch "\.(js|css)$"> Header Set Cache-Control "public" Header Set Expires "Sat, 24 Jan 2015 16:00:00 GMT" </FilesMatch>

Where 3600  is time limit in second or "Tue, 27 Jan 2015 10:54:00 GMT",, after this time cache remove from website and new file download if website again open.

11. How to redirect entire website to a secure connection(https).

RewriteEngine ON
RewriteCond %{HTTPS} !on
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

12. How to run CGI script outside of "cgi-bin" folder.

AddHandler cgi-script .cgi
Options +ExecCGI

13. How to rename the HTACCESS File.

AccessFileName secret.cess

14. How to configure individual file in HTACCESS.

<files conf.html="">
Order allow, deny
Deny from

Where secret.html is the file name to conigure.

15.How to prevent website directory listing.

Options -Indexes

16. How to Prevent Image Hotlinking for a Website

RewriteEngine ON
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERERER} !^http://(www\.)?mywebsite.com/.*$ [NC]
RewriteRule \.(gif|jpeg|png)$ - [F].

17. How to Redirect users to a Maintenance page.

RewriteCond %{REQUEST_URI} !^/admin/ [NC]
RewriteCond %{REQUEST_URI} !^((.*).css|(.*).js|(.*).png|(.*).jpg) [NC]
RewriteRule ^(.*)$ /errpage/maintainence.html

18. How to Redirect non-www to www.

RewriteEngine ON
RewriteCond %{HTTP_HOST} ^mywebsite\.com$
RewriteRule (.*) http://www.mywebsite.com/$1 [R=301,L]

19. How to map a domain to IP Address.

For Mapping L.M.N.O address to a domain name www.google.com
RewriteCond %{HTTP_HOST} ^L\.M\.N\.O$ [NC]
RewriteRule ^(.*)$ http://www.google.com/$1 [L,R=301]

20. How to change Default charset and language headers.

AddDefaultCharset UTF-8
DefaultLanguage en-US

Perfect and powerful cross-platform IDE for development of Java App, Android App, Web, PHP, Python, free for students* and have many features.

Every aspect of IntelliJ IDEA is specifically designed to maximize developer productivity.

Together, powerful static code analysis and ergonomic design make development not only productive but also an enjoyable experience.

After IntelliJ IDEA's indexed your source code, it offers blazing fast and intelligent experience by giving relevant suggestions in every context: instant and clever code completion, on-the-fly code analysis and reliable refactoring tools.

Mission-critical tools such as integrated version controls systems and a wide variety of supported languages and frameworks are at your hand — no plugin hustle included.

XAMPP 7.0.3
XAMPP is an easy to install multi-platform Apache distribution containing MariaDB, PHP, and Perl. Just download and start the installer. It's that easy.

DOWNLOAD: WINDOWS 7+, MAC OS(64 Bit), Linux 32Bit, Linux 64 Bit

XAMPP 1.8.3 (PHP 5.5)
Xampp is the best PHP + Mysql development environment. It is completly free and easy to install distribution, containing PHP, MYSQL, APACHE, PERL.


phpMyAdmin 4.1.7
Bringing Mysql to the web. It provides the visual display of mysql on the web and easy to access your mysql from the web with administrative control also.

Try Demo
Visit Website

Ultimate ISO Maker 2.0

Ultimate ISO is a handy and reliable utility designed to generate .ISO files from your CDs and DVDs.Then, it allows you to burn these ISO files, to use CD emulation software (in order not to use any more the original CD) or to make a backup copy.
Powered by Blogger.