logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Question about IfModule directive
Author
Ang3lus



Joined: 02 Aug 2010
Posts: 18

PostPosted: Mon 16 Aug '10 18:16    Post subject: Question about IfModule directive Reply with quote

Hi

How i can used <IfModules> test </IfModules>

where i need to put this directive <IfModules> test </IfModules> inside configuration file or inside .htaccess file.


Any help would be appreciated.

Thanks in advanced


Last edited by Ang3lus on Tue 17 Aug '10 16:18; edited 1 time in total
Back to top
glsmith
Moderator


Joined: 16 Oct 2007
Posts: 2268
Location: Sun Diego, USA

PostPosted: Mon 16 Aug '10 22:40    Post subject: Reply with quote

the docs state IfModule can be used in these contexts
Apache Docs wrote:
Context: server config, virtual host, directory, .htaccess


First, the familiar LoadModule
LoadModule cgi_module modules/mod_cgi.so
_____.____^^^^^^^^

The below example will set the environment variables CGI_MODULE & INCLUDE_MODULE to either
"LOADED" or "UNLOADED" using the IfModule & !IfModule directive.

# The Newer Way
<IfModule cgi_module>
SetEnv CGI_MODULE LOADED
</IfModule>

# The Old Ancient Way
<IfModule mod_include.c>
SetEnv INCLUDE_MODULE LOADED
</IfModule>

# The Old Ancient Way if module doesn't exist
<!IfModule mod_cgi.c>
SetEnv CGI_MODULE UNLOADED
</IfModule>

# The Newer Way if module doesn't exist
<!IfModule include_module>
SetEnv INCLUDE_MODULE UNLOADED
</IfModule>
Back to top
Ang3lus



Joined: 02 Aug 2010
Posts: 18

PostPosted: Tue 17 Aug '10 16:17    Post subject: Reply with quote

Thanks for your help Mr. Green
Back to top


Reply to topic   Topic: Question about IfModule directive View previous topic :: View next topic
Post new topic   Forum Index -> Apache