You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Nainil Chheda <na...@eliteral.com> on 2007/07/07 18:38:38 UTC

[users@httpd] Mod Rewrite - Modify Website

Hello,

Is there any Mod Rewrite Rule or any other Rule which would allow me to put
a "header file" in all the web pages without me modifying the contents of
each web pages?

Can I do something in the ".htaccess" file example for that?

Best Regards
Nainil Chheda
Knowledge Research Specialist.
--------------------------------------
http://www.nainil.com
Board Line: +1 (508) 475 0500 ext 335
Direct Line: +1 (267) 241 3796
Direct Fax: +1 (508) 836 4466
-------------------------------------- 


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Mod Rewrite - Modify Website

Posted by Vincent Bray <no...@gmail.com>.
On 07/07/07, Nainil Chheda <na...@eliteral.com> wrote:
> Is there any Mod Rewrite Rule or any other Rule which would allow me to put
> a "header file" in all the web pages without me modifying the contents of
> each web pages?

mod_rewrite rewrites URLs and other aspects of requests like
environment variables, it doesn't ever alter response bodies.  There
are various modules able to alter responses of varying complexity,
split between those which are markup-aware and thereby able to insert
content at arbitrary points in a html response and those which simply
prepend or append to the response. Have a hunt around for
mod_publisher and mod_layout as examples.

> Can I do something in the ".htaccess" file example for that?

Depends on the solution you chose. However this isn't generally an
area where htaccess files fit, given the need for general server
access to install the module.

An alternative solution if you don't mind doing some programming
legwork is to use the Action directive with a cgi-style script which
would receive the request along with an indication of the requested
(existent) file.

-- 
noodl

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org