You can display script code as a source code instead of executing.
Syntax:
RemoveHandler cgi-script .pl .cgi .php .py
AddType text/plain .pl .cgi .php .py
Explanation:
where,
RemoveHandler - remove all the server-parsed handler associated with the extensions like .pl, .php for all the paths.
.cgi - run outside of /cgi-bin/ directory
.py - treat same as a normal HTML file
AddType - used to assign a MIME type to a file suffix
text/plain - format of file.
Related Post:
Syntax:
RemoveHandler cgi-script .pl .cgi .php .py
AddType text/plain .pl .cgi .php .py
Explanation:
where,
RemoveHandler - remove all the server-parsed handler associated with the extensions like .pl, .php for all the paths.
.cgi - run outside of /cgi-bin/ directory
.py - treat same as a normal HTML file
AddType - used to assign a MIME type to a file suffix
text/plain - format of file.
Related Post:
What is htaccess?
Restrict users to access pages from site using .htaccess
Compressing resource with gzip using .htaccess
How to create error document using .htaccess
How to add expires headers using .htaccess
How to add MIME types using .htaccess
How to enable SSI using .htaccess
How to prevent access to php.ini file using .htaccess
How to enable or disable directory list using .htaccess
How to redirect urls using .htaccess
How to redirect to www using .htaccess
How to enable short tag in php using .htaccess
How to access pages through one page in site using .htaccess
Restrict users to access pages from site using .htaccess
Compressing resource with gzip using .htaccess
How to create error document using .htaccess
How to add expires headers using .htaccess
How to add MIME types using .htaccess
How to enable SSI using .htaccess
How to prevent access to php.ini file using .htaccess
How to enable or disable directory list using .htaccess
How to redirect urls using .htaccess
How to redirect to www using .htaccess
How to enable short tag in php using .htaccess
How to access pages through one page in site using .htaccess
No comments:
Post a Comment