Itay Sharon
Itay Sharon

Reputation: 49

How to use cgi in the Apache htaccess

I am trying to edit my .htaccess that any .test files will be treated as php The Apache site tells something about cgi script My question is how to do that? Thx .htaccess: Options +FollowSymLinks -MultiViews # Turn mod_rewrite on RewriteEngine On ## hide .php extension RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^([^\.]+)$ $1.php [NC,L] #set path for error pages ErrorDocument 401 /401.php ErrorDocument 404 /404.php AddHandler application/x-httpd-php .html .htm .shtml .test AddType application/x-httpd-php .html .htm .shtml .test

Upvotes: 0

Views: 297

Answers (2)

Fakhruddin Ujjainwala
Fakhruddin Ujjainwala

Reputation: 2553

Just update this in your .htaccess file:

AddHandler application/x-httpd-php .html .htm .shtml .test
AddType application/x-httpd-php .html .htm .shtml .test

Upvotes: 1

mitkosoft
mitkosoft

Reputation: 5316

Add the following line into it:

Addhandler application/x-httpd-php .html .php .test

Upvotes: 0

Related Questions