Welcome to HostingForumz.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Rewrite with .htaccess, php on linux

 
   Web Hosting Problem Solving Community! (Home) -> Apache RSS
Next:  where to get libphp4.so  
Author Message
jlanier01

External


Since: Apr 15, 2004
Posts: 1



(Msg. 1) Posted: Thu Apr 15, 2004 9:57 am
Post subject: Rewrite with .htaccess, php on linux
Archived from groups: alt>apache>configuration (more info?)

I am trying to achieve this solution of having pages served statically
by the web server. The URL rewriting is occuring, but I can't get the
server to output the file as an .html page. Is there something similar
in .php to force the output of the query to be written statically.

Thanks,
Jason

p.s. I broke my wrist recently, or I would write more Wink






On-the-fly Content-Regeneration
Problem Description:

Here comes a really esoteric feature: Dynamically generated but
statically served pages, i.e. pages should be delivered as pur static
pages (read from the filesystem and just passed through), but they
have to be generated dynamically by the webserver if missing. This way
you can have CGI-generated pages which are statically unless one (or a
cronjob) removes the static contents. Then the contents gets
refreshed.


Problem Solution:

This is done via the following ruleset:

RewriteCond %{REQUEST_FILENAME} !-s
RewriteCond ^page\.html$ page.cgi
[T=application/x-httpd-cgi,L]



Here a request to page.html leads to a internal run of a corresponding
page.cgi if page.html is still missing or has filesize null. The trick
here is that page.cgi is a usual CGI script which (additionally to its
STDOUT) writes its output to the file page.html. Once it was run, the
server sends out the data of page.html. When the webmaster wants to
force a refresh the contents, he just removes page.html (usually done
by a cronjob).

 >> Stay informed about: Rewrite with .htaccess, php on linux 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
.htaccess rewrite - Hello. I'm trying to redirect all requests from http://domain1.com/* to http://domain2.com/* I have the following in my .htaccess file in the doc root of domain1.com: RewriteEngine on RewriteCond %{REQUEST_URI} !-U RewriteRule ^(.+) ..

CGI (Linux) - Hi, I would like to allow perl CGIs to execute programs located in /usr/local/bin . How do I configure apache 1.3.23? Regards Chris

Mandrake Linux - Just to let you know that I have the ISO images of Mandrake 9.1 on my server available for download. Mandrake 9.2 has been released and has yet to be made available to the public. But the 9.1 release has been removed from all of their sites. If you reall...

Apache and PHP on RH Linux 8 - I have been running PHP 4.3.x on Apache 1.3.26 and RH Linux 8.0 for almost 6 months now. Just recently I went to do some PHP development and I noticed that the Apache httpd daemon was not running. At first httpd would not load, but then I noticed that i...

Apache/Linux vs IIS/2k3 - Apparantly IIS is now built in the Windows 2003 kernel, thus making it way faster than before, when IIS was modular. "they" say Apache's performance on 2k3 will now not match IIS's, and even a Linux/Apache combo should have a hard time keeping ...
   Web Hosting Problem Solving Community! (Home) -> Apache All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]