kearva/mod_frameredirect
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Repository files navigation
This is a module to make cloaked forwarding with a FRAME wrapper directly from the apache configuration. This code is simple and small, and is faster and more efficient then calling an external program to handle the same tasks. Project home page: https://github.com/kearva/mod_frameredirect === Install === Installation requires a compiler, standard system include files and the usual Apache development libraries. Use the apxs2 script included in your Apache distribution to perform the installation: apxs2 -i -a -c mod_frameredirect.c In Debian this will create a standard load script and enable the module from the next Apache server restart. === Apache configuration === To use this module in a server configuration, you need to set the handler "frameredirect" and add the URL with the directive FrameRedirectUrl. Other directives are optional. The module handles the following three directives, within the context of a server configuration. The directives are not valid per directory or in .htaccess. FrameRedirectUrl [the url to forward to] FrameRedirectTitle [site title] (optional) FrameRedirectDescription [metadata description] (optional) or FrameRedirectConf the-url-to-forward-to [site-title [metadata-description]] == Example 1 == <VirtualHost *:80> ServerName test.example.com ServerAdmin webmaster@example.com SetHandler frameredirect FrameRedirectUrl http://www.example.com/test/ FrameRedirectTitle "Test site title" FrameRedirectDescription "This is a description of the page" </VirtualHost> == Example 2 == <VirtualHost *:80> ServerName test.example.com ServerAdmin webmaster@example.com SetHandler frameredirect FrameRedirectConf http://www.example.com/test/ "Test site title" "This is a description of the page" </VirtualHost> == Resulting HTML (from both example 1 and 2) == <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd"> <HTML> <HEAD> <TITLE>Test site title</TITLE> <META NAME="Description" CONTENT="This is a description of the page"> </HEAD> <FRAMESET ROWS="100%,*" STYLE="border: none 0px #ffffff; margin: 0; padding:0;"> <FRAME NAME="_main" MARGINWIDTH="10" MARGINHEIGHT="10" SRC="http://www.example.com/test/"> <NOFRAMES> <P>The document is located <A HREF="http://www.example.com/test/">here</A>.</P> </NOFRAMES> </FRAMESET> </HTML> == Authors and contributors == Kent Are Varmedal (kearva) Jan Ingvoldstad (jani)