Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
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.
| |
|
Topic: Question about IfModule directive |
|
Author |
|
Ang3lus
Joined: 02 Aug 2010 Posts: 18
|
Posted: Mon 16 Aug '10 18:16 Post subject: Question about IfModule directive |
|
|
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
|
Posted: Mon 16 Aug '10 22:40 Post subject: |
|
|
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
|
Posted: Tue 17 Aug '10 16:17 Post subject: |
|
|
Thanks for your help |
|
Back to top |
|
|
|
|
|
|